📄 class_message_authentication_code.html
字号:
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="15944a7b920e2c24bd1cb67d0303dd2a"></a><!-- doxytag: member="MessageAuthenticationCode::OptimalDataAlignment" ref="15944a7b920e2c24bd1cb67d0303dd2a" args="() const" -->virtual unsigned int </td><td class="memItemRight" valign="bottom"><a class="el" href="class_hash_transformation.html#15944a7b920e2c24bd1cb67d0303dd2a">OptimalDataAlignment</a> () const</td></tr><tr><td class="mdescLeft"> </td><td class="mdescRight">returns how input should be aligned for optimal performance <br></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="f8124c4fca23b74bbdc43660bdae692c"></a><!-- doxytag: member="MessageAuthenticationCode::CalculateDigest" ref="f8124c4fca23b74bbdc43660bdae692c" args="(byte *digest, const byte *input, size_t length)" -->virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="class_hash_transformation.html#f8124c4fca23b74bbdc43660bdae692c">CalculateDigest</a> (byte *digest, const byte *input, size_t length)</td></tr><tr><td class="mdescLeft"> </td><td class="mdescRight">use this if your input is in one piece and you don't want to call <a class="el" href="class_hash_transformation.html#afabefaf445b65d3ba0d8e1c0294afe5" title="process more input">Update()</a> and <a class="el" href="class_hash_transformation.html#a0b8c7a110d8968268fd02ec32b9a8e8" title="compute hash for current message, then restart for a new message">Final()</a> separately <br></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">virtual bool </td><td class="memItemRight" valign="bottom"><a class="el" href="class_hash_transformation.html#16c4aecd047015d513feef4ed5b929ba">Verify</a> (const byte *digest)</td></tr><tr><td class="mdescLeft"> </td><td class="mdescRight">verify that digest is a valid digest for the current message, then reinitialize the object <a href="#16c4aecd047015d513feef4ed5b929ba"></a><br></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="cad96df68e70d922683e5063057130b2"></a><!-- doxytag: member="MessageAuthenticationCode::VerifyDigest" ref="cad96df68e70d922683e5063057130b2" args="(const byte *digest, const byte *input, size_t length)" -->virtual bool </td><td class="memItemRight" valign="bottom"><a class="el" href="class_hash_transformation.html#cad96df68e70d922683e5063057130b2">VerifyDigest</a> (const byte *digest, const byte *input, size_t length)</td></tr><tr><td class="mdescLeft"> </td><td class="mdescRight">use this if your input is in one piece and you don't want to call <a class="el" href="class_hash_transformation.html#afabefaf445b65d3ba0d8e1c0294afe5" title="process more input">Update()</a> and <a class="el" href="class_hash_transformation.html#16c4aecd047015d513feef4ed5b929ba" title="verify that digest is a valid digest for the current message, then reinitialize the...">Verify()</a> separately <br></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="590ecda344aa0fb045abf42ec08823b2"></a><!-- doxytag: member="MessageAuthenticationCode::TruncatedFinal" ref="590ecda344aa0fb045abf42ec08823b2" args="(byte *digest, size_t digestSize)=0" -->virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="class_hash_transformation.html#590ecda344aa0fb045abf42ec08823b2">TruncatedFinal</a> (byte *digest, size_t digestSize)=0</td></tr><tr><td class="mdescLeft"> </td><td class="mdescRight">truncated version of <a class="el" href="class_hash_transformation.html#a0b8c7a110d8968268fd02ec32b9a8e8" title="compute hash for current message, then restart for a new message">Final()</a> <br></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="0b6917657eaec935750fd83e28270d76"></a><!-- doxytag: member="MessageAuthenticationCode::CalculateTruncatedDigest" ref="0b6917657eaec935750fd83e28270d76" args="(byte *digest, size_t digestSize, const byte *input, size_t length)" -->virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="class_hash_transformation.html#0b6917657eaec935750fd83e28270d76">CalculateTruncatedDigest</a> (byte *digest, size_t digestSize, const byte *input, size_t length)</td></tr><tr><td class="mdescLeft"> </td><td class="mdescRight">truncated version of <a class="el" href="class_hash_transformation.html#f8124c4fca23b74bbdc43660bdae692c" title="use this if your input is in one piece and you don't want to call Update() and Final()...">CalculateDigest()</a> <br></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="0f6069eadf492d970c3eb8cdf656e742"></a><!-- doxytag: member="MessageAuthenticationCode::TruncatedVerify" ref="0f6069eadf492d970c3eb8cdf656e742" args="(const byte *digest, size_t digestLength)" -->virtual bool </td><td class="memItemRight" valign="bottom"><a class="el" href="class_hash_transformation.html#0f6069eadf492d970c3eb8cdf656e742">TruncatedVerify</a> (const byte *digest, size_t digestLength)</td></tr><tr><td class="mdescLeft"> </td><td class="mdescRight">truncated version of <a class="el" href="class_hash_transformation.html#16c4aecd047015d513feef4ed5b929ba" title="verify that digest is a valid digest for the current message, then reinitialize the...">Verify()</a> <br></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="7958e99717019e8b9f91672bdfe9e086"></a><!-- doxytag: member="MessageAuthenticationCode::VerifyTruncatedDigest" ref="7958e99717019e8b9f91672bdfe9e086" args="(const byte *digest, size_t digestLength, const byte *input, size_t length)" -->virtual bool </td><td class="memItemRight" valign="bottom"><a class="el" href="class_hash_transformation.html#7958e99717019e8b9f91672bdfe9e086">VerifyTruncatedDigest</a> (const byte *digest, size_t digestLength, const byte *input, size_t length)</td></tr><tr><td class="mdescLeft"> </td><td class="mdescRight">truncated version of <a class="el" href="class_hash_transformation.html#cad96df68e70d922683e5063057130b2" title="use this if your input is in one piece and you don't want to call Update() and Verify()...">VerifyDigest()</a> <br></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="4f31510a192d1121856efe8ad0a9b844"></a><!-- doxytag: member="MessageAuthenticationCode::AlgorithmName" ref="4f31510a192d1121856efe8ad0a9b844" args="() const" -->virtual std::string </td><td class="memItemRight" valign="bottom"><a class="el" href="class_algorithm.html#4f31510a192d1121856efe8ad0a9b844">AlgorithmName</a> () const</td></tr><tr><td class="mdescLeft"> </td><td class="mdescRight">returns name of this algorithm, not universally implemented yet <br></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="d0016ba2d505c23aa85aad49e6c19bb7"></a><!-- doxytag: member="MessageAuthenticationCode::Clone" ref="d0016ba2d505c23aa85aad49e6c19bb7" args="() const" -->virtual <a class="el" href="class_clonable.html">Clonable</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="class_clonable.html#d0016ba2d505c23aa85aad49e6c19bb7">Clone</a> () const</td></tr><tr><td class="mdescLeft"> </td><td class="mdescRight">this is not implemented by most classes yet <br></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="b9e027a141d40929fef51343064d1a69"></a><!-- doxytag: member="MessageAuthenticationCode::MinKeyLength" ref="b9e027a141d40929fef51343064d1a69" args="() const=0" -->virtual size_t </td><td class="memItemRight" valign="bottom"><a class="el" href="class_simple_keying_interface.html#b9e027a141d40929fef51343064d1a69">MinKeyLength</a> () const=0</td></tr><tr><td class="mdescLeft"> </td><td class="mdescRight">returns smallest valid key length in bytes */ <br></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="99ebc91e778d51d8481c4c4e8403508b"></a><!-- doxytag: member="MessageAuthenticationCode::MaxKeyLength" ref="99ebc91e778d51d8481c4c4e8403508b" args="() const=0" -->virtual size_t </td><td class="memItemRight" valign="bottom"><a class="el" href="class_simple_keying_interface.html#99ebc91e778d51d8481c4c4e8403508b">MaxKeyLength</a> () const=0</td></tr><tr><td class="mdescLeft"> </td><td class="mdescRight">returns largest valid key length in bytes */ <br></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="f900bd0bce7f925cfe8c6002b828d810"></a><!-- doxytag: member="MessageAuthenticationCode::DefaultKeyLength" ref="f900bd0bce7f925cfe8c6002b828d810" args="() const=0" -->virtual size_t </td><td class="memItemRight" valign="bottom"><a class="el" href="class_simple_keying_interface.html#f900bd0bce7f925cfe8c6002b828d810">DefaultKeyLength</a> () const=0</td></tr><tr><td class="mdescLeft"> </td><td class="mdescRight">returns default (recommended) key length in bytes */ <br></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="d4fb24fe36b6396c361d83dcc8c647f0"></a><!-- doxytag: member="MessageAuthenticationCode::GetValidKeyLength" ref="d4fb24fe36b6396c361d83dcc8c647f0" args="(size_t n) const=0" -->virtual size_t </td><td class="memItemRight" valign="bottom"><a class="el" href="class_simple_keying_interface.html#d4fb24fe36b6396c361d83dcc8c647f0">GetValidKeyLength</a> (size_t n) const=0</td></tr><tr><td class="mdescLeft"> </td><td class="mdescRight">returns the smallest valid key length in bytes that is >= min(n, GetMaxKeyLength()) <br></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="2229cdb9d7ac7e2cf3b02b39ae59ad77"></a><!-- doxytag: member="MessageAuthenticationCode::IsValidKeyLength" ref="2229cdb9d7ac7e2cf3b02b39ae59ad77" args="(size_t n) const" -->virtual bool </td><td class="memItemRight" valign="bottom"><a class="el" href="class_simple_keying_interface.html#2229cdb9d7ac7e2cf3b02b39ae59ad77">IsValidKeyLength</a> (size_t n) const</td></tr><tr><td class="mdescLeft"> </td><td class="mdescRight">returns whether n is a valid key length <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_simple_keying_interface.html#df3c29b3ef3af74788a58c7c49887fd7">SetKey</a> (const byte *key, size_t length, const <a class="el" href="class_name_value_pairs.html">NameValuePairs</a> &params=<a class="el" href="cryptlib_8h.html#d3205973dd1afa14090a683154c1109c">g_nullNameValuePairs</a>)</td></tr><tr><td class="mdescLeft"> </td><td class="mdescRight">set or reset the key of this object <a href="#df3c29b3ef3af74788a58c7c49887fd7"></a><br></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="0401f9c67930805180964bc02ae0ac1c"></a><!-- doxytag: member="MessageAuthenticationCode::SetKeyWithRounds" ref="0401f9c67930805180964bc02ae0ac1c" args="(const byte *key, size_t length, int rounds)" -->void </td><td class="memItemRight" valign="bottom"><a class="el" href="class_simple_keying_interface.html#0401f9c67930805180964bc02ae0ac1c">SetKeyWithRounds</a> (const byte *key, size_t length, int rounds)</td></tr><tr><td class="mdescLeft"> </td><td class="mdescRight">calls <a class="el" href="class_simple_keying_interface.html#df3c29b3ef3af74788a58c7c49887fd7" title="set or reset the key of this object">SetKey()</a> with an <a class="el" href="class_name_value_pairs.html" title="interface for retrieving values given their names">NameValuePairs</a> object that just specifies "Rounds" <br></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="c25e27eaeae2e909741c07de93caef49"></a><!-- doxytag: member="MessageAuthenticationCode::SetKeyWithIV" ref="c25e27eaeae2e909741c07de93caef49" args="(const byte *key, size_t length, const byte *iv)" -->void </td><td class="memItemRight" valign="bottom"><a class="el" href="class_simple_keying_interface.html#c25e27eaeae2e909741c07de93caef49">SetKeyWithIV</a> (const byte *key, size_t length, const byte *iv)</td></tr><tr><td class="mdescLeft"> </td><td class="mdescRight">calls <a class="el" href="class_simple_keying_interface.html#df3c29b3ef3af74788a58c7c49887fd7" title="set or reset the key of this object">SetKey()</a> with an <a class="el" href="class_name_value_pairs.html" title="interface for retrieving values given their names">NameValuePairs</a> object that just specifies "IV" <br></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="22087180aa396209403b0852e9efc431"></a><!-- doxytag: member="MessageAuthenticationCode::IVRequirement" ref="22087180aa396209403b0852e9efc431" args="() const=0" -->virtual <a class="el" href="class_simple_keying_interface.html#88201c180fbfaa9fef2715252546ad6e">IV_Requirement</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="class_simple_keying_interface.html#22087180aa396209403b0852e9efc431">IVRequirement</a> () const=0</td></tr><tr><td class="mdescLeft"> </td><td class="mdescRight">returns the minimal requirement for secure IVs <br></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="class_simple_keying_interface.html#71039112353cc70e9859ebd95037cc1a">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) <a href="#71039112353cc70e9859ebd95037cc1a"></a><br></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a09fd0893ac8c6068e07ce30bb55c1d9"></a><!-- doxytag: member="MessageAuthenticationCode::CanUseRandomIVs" ref="a09fd0893ac8c6068e07ce30bb55c1d9" args="() const" -->bool </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"> </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="MessageAuthenticationCode::CanUsePredictableIVs" ref="b98803e8744b73663e7e9c872eef822b" args="() const" -->bool </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"> </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="MessageAuthenticationCode::CanUseStructuredIVs" ref="fbf7065f7db5439d471d1bcc260d3bd5" args="() const" -->bool </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"> </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="MessageAuthenticationCode::IVSize" ref="c6da9a8d3c783014ab54a2a3ee9e676a" args="() const" -->virtual unsigned int </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"> </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="MessageAuthenticationCode::Resynchronize" ref="8ee3f5f9c00d193bf9d8fd8aa46ccbb2" args="(const byte *IV)" -->virtual void </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"> </td><td class="mdescRight">resynchronize with an IV <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_simple_keying_interface.html#917224bb6df7431d6469e7a10feac5fa">GetNextIV</a> (<a class="el" href="class_random_number_generator.html">RandomNumberGenerator</a> &rng, byte *IV)</td></tr><tr><td class="mdescLeft"> </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="64ba03d31c489dc32b50e00d377d8032"></a><!-- doxytag: member="MessageAuthenticationCode::ThrowIfInvalidTruncatedSize" ref="64ba03d31c489dc32b50e00d377d8032" args="(size_t size) const" -->void </td><td class="memItemRight" valign="bottom"><a class="el" href="class_hash_transformation.html#64ba03d31c489dc32b50e00d377d8032">ThrowIfInvalidTruncatedSize</a> (size_t size) const</td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="b6afcfe922c393cc1954d37fc4264637"></a><!-- doxytag: member="MessageAuthenticationCode::GetAlgorithm" ref="b6afcfe922c393cc1954d37fc4264637" args="() const=0" -->virtual const <a class="el" href="class_algorithm.html">Algorithm</a> & </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="MessageAuthenticationCode::UncheckedSetKey" ref="911df1b09f35e18a19e474942971947b" args="(const byte *key, unsigned int length, const NameValuePairs &params)=0" -->virtual void </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> &params)=0</td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="32b2095542b18025814118734bf34da2"></a><!-- doxytag: member="MessageAuthenticationCode::ThrowIfInvalidKeyLength" ref="32b2095542b18025814118734bf34da2" args="(size_t length)" -->void </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="MessageAuthenticationCode::ThrowIfResynchronizable" ref="e60d9774af66fc673fe6139f5880c477" args="()" -->void </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="MessageAuthenticationCode::ThrowIfInvalidIV" ref="c687add7d0a09c626d85b77714bbd114" args="(const byte *iv)" -->void </td><td class="memItemRight" valign="bottom"><a class="el" href="class_simple_keying_interface.html#c687add7d0a09c626d85b77714bbd114">ThrowIfInvalidIV</a> (const byte *iv)</td></tr>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -