📄 class_h_m_a_c.html
字号:
<a class="anchor" name="df3c29b3ef3af74788a58c7c49887fd7"></a><!-- doxytag: member="HMAC::SetKey" ref="df3c29b3ef3af74788a58c7c49887fd7" args="(const byte *key, size_t length, const NameValuePairs &params=g_nullNameValuePairs)" --><div class="memitem"><div class="memproto"> <table class="memname"> <tr> <td class="memname">void SimpleKeyingInterface::SetKey </td> <td>(</td> <td class="paramtype">const byte * </td> <td class="paramname"> <em>key</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">size_t </td> <td class="paramname"> <em>length</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const <a class="el" href="class_name_value_pairs.html">NameValuePairs</a> & </td> <td class="paramname"> <em>params</em> = <code><a class="el" href="cryptlib_8h.html#d3205973dd1afa14090a683154c1109c">g_nullNameValuePairs</a></code></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td width="100%"><code> [virtual, inherited]</code></td> </tr> </table></div><div class="memdoc"><p>set or reset the key of this object <p><dl compact><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>params</em> </td><td>is used to specify Rounds, BlockSize, etc </td></tr> </table></dl><p>Reimplemented in <a class="el" href="class_e_c_b___one_way.html#ea389c964114b73390dd81d836124461">ECB_OneWay</a>.<p>Definition at line <a class="el" href="cryptlib_8cpp-source.html#l00052">52</a> of file <a class="el" href="cryptlib_8cpp-source.html">cryptlib.cpp</a>.<p>References <a class="el" href="cryptlib_8cpp-source.html#l00068">SimpleKeyingInterface::ThrowIfInvalidKeyLength()</a>.<p>Referenced by <a class="el" href="cbcmac_8h-source.html#l00039">CBC_MAC< T >::CBC_MAC()</a>, <a class="el" href="modes_8h-source.html#l00267">CipherModeFinalTemplate_CipherHolder< CIPHER, BASE >::CipherModeFinalTemplate_CipherHolder()</a>, <a class="el" href="dmac_8h-source.html#l00043">DMAC< T >::DMAC()</a>, <a class="el" href="hmac_8h-source.html#l00047">HMAC< T >::HMAC()</a>, <a class="el" href="panama_8h-source.html#l00104">Weak::PanamaMAC< B >::PanamaMAC()</a>, <a class="el" href="modes_8h-source.html#l00194">ECB_OneWay::SetKey()</a>, <a class="el" href="cryptlib_8cpp-source.html#l00063">SimpleKeyingInterface::SetKeyWithIV()</a>, <a class="el" href="cryptlib_8cpp-source.html#l00058">SimpleKeyingInterface::SetKeyWithRounds()</a>, <a class="el" href="vmac_8cpp-source.html#l00031">VMAC_Base::UncheckedSetKey()</a>, and <a class="el" href="modes_8cpp-source.html#l00087">BlockOrientedCipherModeBase::UncheckedSetKey()</a>.</div></div><p><a class="anchor" name="71039112353cc70e9859ebd95037cc1a"></a><!-- doxytag: member="HMAC::IsResynchronizable" ref="71039112353cc70e9859ebd95037cc1a" args="() const" --><div class="memitem"><div class="memproto"> <table class="memname"> <tr> <td class="memname">bool SimpleKeyingInterface::IsResynchronizable </td> <td>(</td> <td class="paramname"> </td> <td> ) </td> <td width="100%"> const<code> [inline, inherited]</code></td> </tr> </table></div><div class="memdoc"><p>returns whether this object can be resynchronized (i.e. supports initialization vectors) <p>If this function returns true, and no IV is passed to <a class="el" href="class_simple_keying_interface.html#df3c29b3ef3af74788a58c7c49887fd7" title="set or reset the key of this object">SetKey()</a> and <a class="el" href="class_simple_keying_interface.html#fbf7065f7db5439d471d1bcc260d3bd5" title="returns whether this object can use structured IVs, for example a counter (in addition...">CanUseStructuredIVs()</a>==true, an IV of all 0's will be assumed. <p>Definition at line <a class="el" href="cryptlib_8h-source.html#l00388">388</a> of file <a class="el" href="cryptlib_8h-source.html">cryptlib.h</a>.<p>Referenced by <a class="el" href="cryptlib_8cpp-source.html#l00080">SimpleKeyingInterface::ThrowIfInvalidIV()</a>, <a class="el" href="cryptlib_8cpp-source.html#l00074">SimpleKeyingInterface::ThrowIfResynchronizable()</a>, and <a class="el" href="modes_8cpp-source.html#l00087">BlockOrientedCipherModeBase::UncheckedSetKey()</a>.</div></div><p><a class="anchor" name="917224bb6df7431d6469e7a10feac5fa"></a><!-- doxytag: member="HMAC::GetNextIV" ref="917224bb6df7431d6469e7a10feac5fa" args="(RandomNumberGenerator &rng, byte *IV)" --><div class="memitem"><div class="memproto"> <table class="memname"> <tr> <td class="memname">void SimpleKeyingInterface::GetNextIV </td> <td>(</td> <td class="paramtype"><a class="el" href="class_random_number_generator.html">RandomNumberGenerator</a> & </td> <td class="paramname"> <em>rng</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">byte * </td> <td class="paramname"> <em>IV</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td width="100%"><code> [virtual, inherited]</code></td> </tr> </table></div><div class="memdoc"><p>get a secure IV for the next message <p>This method should be called after you finish encrypting one message and are ready to start the next one. After calling it, you must call <a class="el" href="class_simple_keying_interface.html#df3c29b3ef3af74788a58c7c49887fd7" title="set or reset the key of this object">SetKey()</a> or <a class="el" href="class_simple_keying_interface.html#8ee3f5f9c00d193bf9d8fd8aa46ccbb2" title="resynchronize with an IV">Resynchronize()</a> before using this object again. This method is not implemented on decryption objects. <p>Reimplemented in <a class="el" href="class_v_m_a_c___base.html#bd5685ab3eaf6ec272f7e062c3194c6c">VMAC_Base</a>.<p>Definition at line <a class="el" href="cryptlib_8cpp-source.html#l00096">96</a> of file <a class="el" href="cryptlib_8cpp-source.html">cryptlib.cpp</a>.<p>References <a class="el" href="cryptlib_8cpp-source.html#l00157">RandomNumberGenerator::GenerateBlock()</a>, and <a class="el" href="cryptlib_8h-source.html#l00397">SimpleKeyingInterface::IVSize()</a>.<p>Referenced by <a class="el" href="vmac_8cpp-source.html#l00090">VMAC_Base::GetNextIV()</a>.</div></div><p><hr>The documentation for this class was generated from the following file:<ul><li><a class="el" href="hmac_8h-source.html">hmac.h</a></ul><hr size="1"><address style="text-align: right;"><small>Generated on Fri Jun 1 11:11:39 2007 for Crypto++ by <a href="http://www.doxygen.org/index.html"><img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.2 </small></address></body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -