📄 class_message_authentication_code.html
字号:
<tr><td class="memItemLeft" nowrap align=right valign=top><a name="_x_m_a_c_c___basea27" doxytag="MessageAuthenticationCode::SetKeyWithRounds"></a>void </td><td class="memItemRight" valign=bottom><a class="el" href="class_message_authentication_code.html#_x_m_a_c_c___basea27">SetKeyWithRounds</a> (const byte *key, unsigned int length, int rounds)</td></tr><tr><td class="mdescLeft"> </td><td class="mdescRight">calls <a class="el" href="class_simple_keying_interface.html#_x_m_a_c_c___basea26">SetKey()</a> with an <a class="el" href="class_name_value_pairs.html">NameValuePairs</a> object that just specifies "Rounds" <br><br></td></tr><tr><td class="memItemLeft" nowrap align=right valign=top><a name="_x_m_a_c_c___basea28" doxytag="MessageAuthenticationCode::SetKeyWithIV"></a>void </td><td class="memItemRight" valign=bottom><a class="el" href="class_message_authentication_code.html#_x_m_a_c_c___basea28">SetKeyWithIV</a> (const byte *key, unsigned int length, const byte *iv)</td></tr><tr><td class="mdescLeft"> </td><td class="mdescRight">calls <a class="el" href="class_simple_keying_interface.html#_x_m_a_c_c___basea26">SetKey()</a> with an <a class="el" href="class_name_value_pairs.html">NameValuePairs</a> object that just specifies "IV" <br><br></td></tr><tr><td class="memItemLeft" nowrap align=right valign=top><a name="_x_m_a_c_c___basea29" doxytag="MessageAuthenticationCode::IVRequirement"></a>virtual IV_Requirement </td><td class="memItemRight" valign=bottom><a class="el" href="class_message_authentication_code.html#_x_m_a_c_c___basea29">IVRequirement</a> () const=0</td></tr><tr><td class="mdescLeft"> </td><td class="mdescRight">returns the minimal requirement for secure IVs <br><br></td></tr><tr><td class="memItemLeft" nowrap align=right valign=top>bool </td><td class="memItemRight" valign=bottom><a class="el" href="class_message_authentication_code.html#_x_m_a_c_c___basea30">IsResynchronizable</a> () const</td></tr><tr><td class="mdescLeft"> </td><td class="mdescRight">returns whether this object can be resynchronized (i.e. supports initialization vectors) </em> <a href="#_x_m_a_c_c___basea30"></a><em><br><br></td></tr><tr><td class="memItemLeft" nowrap align=right valign=top><a name="_x_m_a_c_c___basea31" doxytag="MessageAuthenticationCode::CanUseRandomIVs"></a>bool </td><td class="memItemRight" valign=bottom><a class="el" href="class_message_authentication_code.html#_x_m_a_c_c___basea31">CanUseRandomIVs</a> () const</td></tr><tr><td class="mdescLeft"> </td><td class="mdescRight">returns whether this object can use random IVs (in addition to ones returned by GetNextIV) <br><br></td></tr><tr><td class="memItemLeft" nowrap align=right valign=top><a name="_x_m_a_c_c___basea32" doxytag="MessageAuthenticationCode::CanUsePredictableIVs"></a>bool </td><td class="memItemRight" valign=bottom><a class="el" href="class_message_authentication_code.html#_x_m_a_c_c___basea32">CanUsePredictableIVs</a> () const</td></tr><tr><td class="mdescLeft"> </td><td class="mdescRight">returns whether this object can use random but possibly predictable IVs (in addition to ones returned by GetNextIV) <br><br></td></tr><tr><td class="memItemLeft" nowrap align=right valign=top><a name="_x_m_a_c_c___basea33" doxytag="MessageAuthenticationCode::CanUseStructuredIVs"></a>bool </td><td class="memItemRight" valign=bottom><a class="el" href="class_message_authentication_code.html#_x_m_a_c_c___basea33">CanUseStructuredIVs</a> () const</td></tr><tr><td class="mdescLeft"> </td><td class="mdescRight">returns whether this object can use structured IVs, for example a counter (in addition to ones returned by GetNextIV) <br><br></td></tr><tr><td class="memItemLeft" nowrap align=right valign=top><a name="_x_m_a_c_ca32" doxytag="MessageAuthenticationCode::IVSize"></a>virtual unsigned int </td><td class="memItemRight" valign=bottom><a class="el" href="class_message_authentication_code.html#_x_m_a_c_ca32">IVSize</a> () const</td></tr><tr><td class="mdescLeft"> </td><td class="mdescRight">returns size of IVs used by this object <br><br></td></tr><tr><td class="memItemLeft" nowrap align=right valign=top><a name="_x_m_a_c_ca33" doxytag="MessageAuthenticationCode::Resynchronize"></a>virtual void </td><td class="memItemRight" valign=bottom><a class="el" href="class_message_authentication_code.html#_x_m_a_c_ca33">Resynchronize</a> (const byte *IV)</td></tr><tr><td class="mdescLeft"> </td><td class="mdescRight">resynchronize with an IV <br><br></td></tr><tr><td class="memItemLeft" nowrap align=right valign=top>virtual void </td><td class="memItemRight" valign=bottom><a class="el" href="class_message_authentication_code.html#_x_m_a_c_ca34">GetNextIV</a> (byte *IV)</td></tr><tr><td class="mdescLeft"> </td><td class="mdescRight">get a secure IV for the next message </em> <a href="#_x_m_a_c_ca34"></a><em><br><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 name="_x_m_a_c_c___baseb7" doxytag="MessageAuthenticationCode::ThrowIfInvalidTruncatedSize"></a>void </td><td class="memItemRight" valign=bottom><b>ThrowIfInvalidTruncatedSize</b> (unsigned int size) const</td></tr><tr><td class="memItemLeft" nowrap align=right valign=top><a name="_x_m_a_c_c___baseb8" doxytag="MessageAuthenticationCode::ThrowIfInvalidKeyLength"></a>void </td><td class="memItemRight" valign=bottom><b>ThrowIfInvalidKeyLength</b> (const <a class="el" href="class_algorithm.html">Algorithm</a> &algorithm, unsigned int length)</td></tr><tr><td class="memItemLeft" nowrap align=right valign=top><a name="_x_m_a_c_c___baseb9" doxytag="MessageAuthenticationCode::AssertValidKeyLength"></a>void </td><td class="memItemRight" valign=bottom><b>AssertValidKeyLength</b> (unsigned int length) const</td></tr></table><hr><h2>Member Function Documentation</h2><a name="_x_m_a_c_c___basea13" doxytag="MessageAuthenticationCode::Final"></a><p><table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> virtual void HashTransformation::Final </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">byte * </td> <td class="mdname1" valign="top" nowrap> <em>digest</em> </td> <td class="md" valign="top"> ) </td> <td class="md" nowrap><code> [inline, virtual, inherited]</code></td> </tr> </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td><p>compute hash for current message, then restart for a new message <p><dl compact><dt><b>Precondition:</b></dt><dd>size of digest == <a class="el" href="class_hash_transformation.html#_x_m_a_c_ca9">DigestSize()</a>. </dd></dl><p>Reimplemented in <a class="el" href="class_p_k_c_s___decorated_hash_module.html#_p_k_c_s___decorated_hash_modulea2">PKCS_DecoratedHashModule< H ></a>, <a class="el" href="class_signature_encoding_method_with_recovery.html#_signature_encoding_method_with_recoverya0">SignatureEncodingMethodWithRecovery</a>, and <a class="el" href="class_e_m_s_a2_decorated_hash_module.html#_e_m_s_a2_decorated_hash_modulea3">EMSA2DecoratedHashModule< H ></a>.<p>Definition at line <a class="el" href="cryptlib_8h-source.html#l00526">526</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#l00635">HashFilter::Put2()</a>, <a class="el" href="pubkey_8h-source.html#l00439">PK_SignerBase< H >::SignAndRestart()</a>, and <a class="el" href="pubkey_8h-source.html#l00449">PK_VerifierBase< H >::VerifyAndRestart()</a>. </td> </tr></table><a name="_x_m_a_c_c___basea15" doxytag="MessageAuthenticationCode::Verify"></a><p><table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> virtual bool HashTransformation::Verify </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">const byte * </td> <td class="mdname1" valign="top" nowrap> <em>digest</em> </td> <td class="md" valign="top"> ) </td> <td class="md" nowrap><code> [inline, virtual, inherited]</code></td> </tr> </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td><p>verify that digest is a valid digest for the current message, then reinitialize the object <p>Default implementation is to call <a class="el" href="class_hash_transformation.html#_x_m_a_c_c___basea13">Final()</a> and do a bitwise comparison between its output and digest. <p>Reimplemented in <a class="el" href="class_signature_encoding_method_with_recovery.html#_signature_encoding_method_with_recoverya2">SignatureEncodingMethodWithRecovery</a>.<p>Definition at line <a class="el" href="cryptlib_8h-source.html#l00549">549</a> of file <a class="el" href="cryptlib_8h-source.html">cryptlib.h</a>.<p>Referenced by <a class="el" href="pubkey_8h-source.html#l00587">VerifierWithRecoveryTemplate< TF, H >::VerifyAndRestart()</a>. </td> </tr></table><a name="_x_m_a_c_c___basea26" doxytag="MessageAuthenticationCode::SetKey"></a><p><table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> <tr>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -