⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 class_symmetric_cipher.html

📁 著名的密码库Crypto++的文档 C++语言的杰作。程序员必备。
💻 HTML
📖 第 1 页 / 共 3 页
字号:
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a09fd0893ac8c6068e07ce30bb55c1d9"></a><!-- doxytag: member="SymmetricCipher::CanUseRandomIVs" ref="a09fd0893ac8c6068e07ce30bb55c1d9" args="() const" -->bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_simple_keying_interface.html#a09fd0893ac8c6068e07ce30bb55c1d9">CanUseRandomIVs</a> () const</td></tr><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">returns whether this object can use random IVs (in addition to ones returned by GetNextIV) <br></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="b98803e8744b73663e7e9c872eef822b"></a><!-- doxytag: member="SymmetricCipher::CanUsePredictableIVs" ref="b98803e8744b73663e7e9c872eef822b" args="() const" -->bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_simple_keying_interface.html#b98803e8744b73663e7e9c872eef822b">CanUsePredictableIVs</a> () const</td></tr><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">returns whether this object can use random but possibly predictable IVs (in addition to ones returned by GetNextIV) <br></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="fbf7065f7db5439d471d1bcc260d3bd5"></a><!-- doxytag: member="SymmetricCipher::CanUseStructuredIVs" ref="fbf7065f7db5439d471d1bcc260d3bd5" args="() const" -->bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_simple_keying_interface.html#fbf7065f7db5439d471d1bcc260d3bd5">CanUseStructuredIVs</a> () const</td></tr><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">returns whether this object can use structured IVs, for example a counter (in addition to ones returned by GetNextIV) <br></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="c6da9a8d3c783014ab54a2a3ee9e676a"></a><!-- doxytag: member="SymmetricCipher::IVSize" ref="c6da9a8d3c783014ab54a2a3ee9e676a" args="() const" -->virtual unsigned int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_simple_keying_interface.html#c6da9a8d3c783014ab54a2a3ee9e676a">IVSize</a> () const</td></tr><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">returns size of IVs used by this object <br></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="8ee3f5f9c00d193bf9d8fd8aa46ccbb2"></a><!-- doxytag: member="SymmetricCipher::Resynchronize" ref="8ee3f5f9c00d193bf9d8fd8aa46ccbb2" args="(const byte *IV)" -->virtual void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_simple_keying_interface.html#8ee3f5f9c00d193bf9d8fd8aa46ccbb2">Resynchronize</a> (const byte *IV)</td></tr><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">resynchronize with an IV <br></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_simple_keying_interface.html#917224bb6df7431d6469e7a10feac5fa">GetNextIV</a> (<a class="el" href="class_random_number_generator.html">RandomNumberGenerator</a> &amp;rng, byte *IV)</td></tr><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">get a secure IV for the next message  <a href="#917224bb6df7431d6469e7a10feac5fa"></a><br></td></tr><tr><td colspan="2"><br><h2>Protected Member Functions</h2></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="b6afcfe922c393cc1954d37fc4264637"></a><!-- doxytag: member="SymmetricCipher::GetAlgorithm" ref="b6afcfe922c393cc1954d37fc4264637" args="() const=0" -->virtual const <a class="el" href="class_algorithm.html">Algorithm</a> &amp;&nbsp;</td><td class="memItemRight" valign="bottom"><b>GetAlgorithm</b> () const=0</td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="911df1b09f35e18a19e474942971947b"></a><!-- doxytag: member="SymmetricCipher::UncheckedSetKey" ref="911df1b09f35e18a19e474942971947b" args="(const byte *key, unsigned int length, const NameValuePairs &amp;params)=0" -->virtual void&nbsp;</td><td class="memItemRight" valign="bottom"><b>UncheckedSetKey</b> (const byte *key, unsigned int length, const <a class="el" href="class_name_value_pairs.html">NameValuePairs</a> &amp;params)=0</td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="32b2095542b18025814118734bf34da2"></a><!-- doxytag: member="SymmetricCipher::ThrowIfInvalidKeyLength" ref="32b2095542b18025814118734bf34da2" args="(size_t length)" -->void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_simple_keying_interface.html#32b2095542b18025814118734bf34da2">ThrowIfInvalidKeyLength</a> (size_t length)</td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="e60d9774af66fc673fe6139f5880c477"></a><!-- doxytag: member="SymmetricCipher::ThrowIfResynchronizable" ref="e60d9774af66fc673fe6139f5880c477" args="()" -->void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_simple_keying_interface.html#e60d9774af66fc673fe6139f5880c477">ThrowIfResynchronizable</a> ()</td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="c687add7d0a09c626d85b77714bbd114"></a><!-- doxytag: member="SymmetricCipher::ThrowIfInvalidIV" ref="c687add7d0a09c626d85b77714bbd114" args="(const byte *iv)" -->void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_simple_keying_interface.html#c687add7d0a09c626d85b77714bbd114">ThrowIfInvalidIV</a> (const byte *iv)</td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="8d63825e000442603429b6f433b798f5"></a><!-- doxytag: member="SymmetricCipher::GetIVAndThrowIfInvalid" ref="8d63825e000442603429b6f433b798f5" args="(const NameValuePairs &amp;params)" -->const byte *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_simple_keying_interface.html#8d63825e000442603429b6f433b798f5">GetIVAndThrowIfInvalid</a> (const <a class="el" href="class_name_value_pairs.html">NameValuePairs</a> &amp;params)</td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="719efcf12f0de461b951830b8131b36a"></a><!-- doxytag: member="SymmetricCipher::AssertValidKeyLength" ref="719efcf12f0de461b951830b8131b36a" args="(size_t length) const " -->void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_simple_keying_interface.html#719efcf12f0de461b951830b8131b36a">AssertValidKeyLength</a> (size_t length) const </td></tr></table><hr><h2>Member Enumeration Documentation</h2><a class="anchor" name="88201c180fbfaa9fef2715252546ad6e"></a><!-- doxytag: member="SymmetricCipher::IV_Requirement" ref="88201c180fbfaa9fef2715252546ad6e" args="" --><div class="memitem"><div class="memproto">      <table class="memname">        <tr>          <td class="memname">enum <a class="el" href="class_simple_keying_interface.html#88201c180fbfaa9fef2715252546ad6e">SimpleKeyingInterface::IV_Requirement</a><code> [inherited]</code>          </td>        </tr>      </table></div><div class="memdoc"><p><dl compact><dt><b>Enumerator: </b></dt><dd><table border="0" cellspacing="2" cellpadding="0"><tr><td valign="top"><em><a class="anchor" name="88201c180fbfaa9fef2715252546ad6e1cc32e69fe4f385e54d9d482a2ab5a56"></a><!-- doxytag: member="UNIQUE_IV" ref="88201c180fbfaa9fef2715252546ad6e1cc32e69fe4f385e54d9d482a2ab5a56" args="" -->UNIQUE_IV</em>&nbsp;</td><td></td></tr><tr><td valign="top"><em><a class="anchor" name="88201c180fbfaa9fef2715252546ad6e4520c4379ee3a1aed95a36e2235ba338"></a><!-- doxytag: member="RANDOM_IV" ref="88201c180fbfaa9fef2715252546ad6e4520c4379ee3a1aed95a36e2235ba338" args="" -->RANDOM_IV</em>&nbsp;</td><td></td></tr><tr><td valign="top"><em><a class="anchor" name="88201c180fbfaa9fef2715252546ad6eceff3ad4b12bcb6d7b61a5bd543a815c"></a><!-- doxytag: member="UNPREDICTABLE_RANDOM_IV" ref="88201c180fbfaa9fef2715252546ad6eceff3ad4b12bcb6d7b61a5bd543a815c" args="" -->UNPREDICTABLE_RANDOM_IV</em>&nbsp;</td><td></td></tr><tr><td valign="top"><em><a class="anchor" name="88201c180fbfaa9fef2715252546ad6eb659bf6d2c470c50c14bfbab5b2d45ab"></a><!-- doxytag: member="INTERNALLY_GENERATED_IV" ref="88201c180fbfaa9fef2715252546ad6eb659bf6d2c470c50c14bfbab5b2d45ab" args="" -->INTERNALLY_GENERATED_IV</em>&nbsp;</td><td></td></tr><tr><td valign="top"><em><a class="anchor" name="88201c180fbfaa9fef2715252546ad6ec1d24de3dedd05c28516f452d3ace417"></a><!-- doxytag: member="NOT_RESYNCHRONIZABLE" ref="88201c180fbfaa9fef2715252546ad6ec1d24de3dedd05c28516f452d3ace417" args="" -->NOT_RESYNCHRONIZABLE</em>&nbsp;</td><td></td></tr></table></dl><p>Definition at line <a class="el" href="cryptlib_8h-source.html#l00382">382</a> of file <a class="el" href="cryptlib_8h-source.html">cryptlib.h</a>.</div></div><p><hr><h2>Member Function Documentation</h2><a class="anchor" name="8c9304fff5af593ee68d3cf0d33c06e9"></a><!-- doxytag: member="SymmetricCipher::Ref" ref="8c9304fff5af593ee68d3cf0d33c06e9" args="()" --><div class="memitem"><div class="memproto">      <table class="memname">        <tr>          <td class="memname"><a class="el" href="class_stream_transformation.html">StreamTransformation</a>&amp; StreamTransformation::Ref           </td>          <td>(</td>          <td class="paramname">          </td>          <td>&nbsp;)&nbsp;</td>          <td width="100%"><code> [inline, inherited]</code></td>        </tr>      </table></div><div class="memdoc"><p>return a reference to this object, <p>This function is useful for passing a temporary <a class="el" href="class_stream_transformation.html" title="interface for the data processing part of stream ciphers">StreamTransformation</a> object to a function that takes a non-const reference. <p>Definition at line <a class="el" href="cryptlib_8h-source.html#l00470">470</a> of file <a class="el" href="cryptlib_8h-source.html">cryptlib.h</a>.</div></div><p><a class="anchor" name="f66ef64545279c01310718af3d627534"></a><!-- doxytag: member="SymmetricCipher::OptimalBlockSize" ref="f66ef64545279c01310718af3d627534" args="() const" --><div class="memitem"><div class="memproto">      <table class="memname">        <tr>          <td class="memname">virtual unsigned int StreamTransformation::OptimalBlockSize           </td>          <td>(</td>          <td class="paramname">          </td>          <td>&nbsp;)&nbsp;</td>          <td width="100%"> const<code> [inline, virtual, inherited]</code></td>        </tr>      </table></div><div class="memdoc"><p>returns the input block size that is most efficient for this cipher <p><dl class="note" compact><dt><b>Note:</b></dt><dd>optimal input length is n * <a class="el" href="class_stream_transformation.html#f66ef64545279c01310718af3d627534" title="returns the input block size that is most efficient for this cipher">OptimalBlockSize()</a> - <a class="el" href="class_stream_transformation.html#b8422f6eee08fbc70069e222186e90de" title="returns how much of the current block is used up">GetOptimalBlockSizeUsed()</a> for any n &gt; 0 </dd></dl><p>Reimplemented in <a class="el" href="class_e_c_b___one_way.html#697d02a4fbec48b4accec6ce4226e083">ECB_OneWay</a>.<p>Definition at line <a class="el" href="cryptlib_8h-source.html#l00477">477</a> of file <a class="el" href="cryptlib_8h-source.html">cryptlib.h</a>.<p>Referenced by <a class="el" href="filters_8cpp-source.html#l00574">StreamTransformationFilter::FirstPut()</a>.</div></div><p><a class="anchor" name="26feabde21bc4d1783195969733e3bb0"></a><!-- doxytag: member="SymmetricCipher::ProcessData" ref="26feabde21bc4d1783195969733e3bb0" args="(byte *outString, const byte *inString, size_t length)=0" --><div class="memitem"><div class="memproto">      <table class="memname">        <tr>          <td class="memname">virtual void StreamTransformation::ProcessData           </td>          <td>(</td>          <td class="paramtype">byte *&nbsp;</td>          <td class="paramname"> <em>outString</em>, </td>        </tr>        <tr>          <td class="paramkey"></td>          <td></td>          <td class="paramtype">const byte *&nbsp;</td>          <td class="paramname"> <em>inString</em>, </td>        </tr>        <tr>          <td class="paramkey"></td>          <td></td>          <td class="paramtype">size_t&nbsp;</td>          <td class="paramname"> <em>length</em></td><td>&nbsp;</td>        </tr>        <tr>          <td></td>          <td>)</td>          <td></td><td></td><td width="100%"><code> [pure virtual, inherited]</code></td>        </tr>      </table></div><div class="memdoc"><p>encrypt or decrypt an array of bytes of specified length <p><dl class="note" compact><dt><b>Note:</b></dt><dd>either inString == outString, or they don't overlap </dd></dl><p>Implemented in <a class="el" href="class_weak1_1_1_a_r_c4___base.html#a20124dfc1bac5050b1cd922e552ba95">Weak1::ARC4_Base</a>, <a class="el" href="class_public_blum_blum_shub.html#fb03a58653cb83c9a9013f3a57105bfc">PublicBlumBlumShub</a>, and <a class="el" href="class_block_oriented_cipher_mode_base.html#947329920de17742397a7c0fd01d3364">BlockOrientedCipherModeBase</a>.<p>Referenced by <a class="el" href="filters_8cpp-source.html#l00613">StreamTransformationFilter::LastPut()</a>, and <a class="el" href="cryptlib_8cpp-source.html#l00119">StreamTransformation::ProcessLastBlock()</a>.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -