📄 class_p_k___verifier_with_recovery.html
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"><title>Crypto++: PK_VerifierWithRecovery class Reference</title><link href="doxygen.css" rel="stylesheet" type="text/css"></head><body><!-- Generated by Doxygen 1.3.2 --><div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="classes.html">Alphabetical List</a> | <a class="qindex" href="annotated.html">Compound List</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="namespacemembers.html">Namespace Members</a> | <a class="qindex" href="functions.html">Compound Members</a> | <a class="qindex" href="globals.html">File Members</a></div><h1>PK_VerifierWithRecovery Class Reference</h1><code>#include <<a class="el" href="cryptlib_8h-source.html">cryptlib.h</a>></code><p><p>Inheritance diagram for PK_VerifierWithRecovery:<p><center><img src="class_p_k___verifier_with_recovery.png" usemap="#PK_VerifierWithRecovery_map" border="0" alt=""></center><map name="PK_VerifierWithRecovery_map"><area href="class_p_k___signature_scheme_with_recovery.html" alt="PK_SignatureSchemeWithRecovery" shape="rect" coords="0,224,241,248"><area href="class_p_k___verifier.html" alt="PK_Verifier" shape="rect" coords="376,224,617,248"><area href="class_p_k___signature_scheme.html" alt="PK_SignatureScheme" shape="rect" coords="0,168,241,192"><area href="class_p_k___signature_scheme.html" alt="PK_SignatureScheme" shape="rect" coords="251,168,492,192"><area href="class_public_key_algorithm.html" alt="PublicKeyAlgorithm" shape="rect" coords="502,168,743,192"><area href="class_asymmetric_algorithm.html" alt="AsymmetricAlgorithm" shape="rect" coords="502,112,743,136"><area href="class_algorithm.html" alt="Algorithm" shape="rect" coords="502,56,743,80"><area href="class_clonable.html" alt="Clonable" shape="rect" coords="502,0,743,24"><area href="class_verifier_with_recovery_template.html" alt="VerifierWithRecoveryTemplate< TF, H >" shape="rect" coords="188,336,429,360"></map><a href="class_p_k___verifier_with_recovery-members.html">List of all members.</a><hr><a name="_details"></a><h2>Detailed Description</h2>interface for public-key verifiers with recovery <p>A PK_VerifierWithRecovery can also be used the same way as a <a class="el" href="class_p_k___verifier.html">PK_Verifier</a>, where the signature and the entire message is given to <a class="el" href="class_p_k___verifier.html#_verifier_with_recovery_templatea16">Verify()</a> or <a class="el" href="class_p_k___verifier.html#_verifier_with_recovery_templatea18">VerifyMessage()</a> as input. <p><p>Definition at line <a class="el" href="cryptlib_8h-source.html#l01330">1330</a> of file <a class="el" href="cryptlib_8h-source.html">cryptlib.h</a>.<table border=0 cellpadding=0 cellspacing=0><tr><td></td></tr><tr><td colspan=2><br><h2>Public Member Functions</h2></td></tr><tr><td class="memItemLeft" nowrap align=right valign=top>virtual bool </td><td class="memItemRight" valign=bottom><a class="el" href="class_p_k___verifier_with_recovery.html#_p_k___verifier_with_recoverya0">SignatureUpfrontForRecovery</a> () const=0</td></tr><tr><td class="memItemLeft" nowrap align=right valign=top><a name="_p_k___verifier_with_recoverya1" doxytag="PK_VerifierWithRecovery::NewRecoveryAccumulator"></a>virtual <a class="el" href="class_hash_transformation.html">HashTransformation</a> * </td><td class="memItemRight" valign=bottom><a class="el" href="class_p_k___verifier_with_recovery.html#_p_k___verifier_with_recoverya1">NewRecoveryAccumulator</a> (const byte *signature=NULL) const=0</td></tr><tr><td class="mdescLeft"> </td><td class="mdescRight">create a new <a class="el" href="class_hash_transformation.html">HashTransformation</a> to accumulate leftover message <br><br></td></tr><tr><td class="memItemLeft" nowrap align=right valign=top>virtual <a class="el" href="struct_decoding_result.html">DecodingResult</a> </td><td class="memItemRight" valign=bottom><a class="el" href="class_p_k___verifier_with_recovery.html#_p_k___verifier_with_recoverya2">Recover</a> (byte *recoveredMessage, <a class="el" href="class_hash_transformation.html">HashTransformation</a> *recoveryAccumulator, const byte *signature=NULL) const=0</td></tr><tr><td class="mdescLeft"> </td><td class="mdescRight">recover a message from its signature </em> <a href="#_p_k___verifier_with_recoverya2"></a><em><br><br></td></tr><tr><td class="memItemLeft" nowrap align=right valign=top>virtual <a class="el" href="struct_decoding_result.html">DecodingResult</a> </td><td class="memItemRight" valign=bottom><a class="el" href="class_p_k___verifier_with_recovery.html#_verifier_with_recovery_templatea13">RecoverMessage</a> (byte *recoveredMessage, const byte *message, unsigned int messageLen, const byte *signature) const</td></tr><tr><td class="mdescLeft"> </td><td class="mdescRight">recover a message from its signature </em> <a href="#_verifier_with_recovery_templatea13"></a><em><br><br></td></tr><tr><td class="memItemLeft" nowrap align=right valign=top><a name="_p_k___verifier_with_recoverya4" doxytag="PK_VerifierWithRecovery::MaximumRecoverableLength"></a>virtual unsigned int </td><td class="memItemRight" valign=bottom><a class="el" href="class_p_k___verifier_with_recovery.html#_p_k___verifier_with_recoverya4">MaximumRecoverableLength</a> () const=0</td></tr><tr><td class="mdescLeft"> </td><td class="mdescRight">length of longest message that can be fully recovered <br><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_p_k___verifier_with_recovery.html#_p_k___verifier_with_recoverya5">AllowLeftoverMessage</a> () const=0</td></tr><tr><td class="mdescLeft"> </td><td class="mdescRight">whether or not messages longer than <a class="el" href="class_p_k___signature_scheme_with_recovery.html#_p_k___verifier_with_recoverya4">MaximumRecoverableLength()</a> can be signed </em> <a href="#_p_k___verifier_with_recoverya5"></a><em><br><br></td></tr><tr><td class="memItemLeft" nowrap align=right valign=top><a name="_p_k___verifier_with_recoverya6" doxytag="PK_VerifierWithRecovery::SignatureLength"></a>virtual unsigned int </td><td class="memItemRight" valign=bottom><a class="el" href="class_p_k___verifier_with_recovery.html#_p_k___verifier_with_recoverya6">SignatureLength</a> () const=0</td></tr><tr><td class="mdescLeft"> </td><td class="mdescRight">signature length support by this object (as either input or output) <br><br></td></tr><tr><td class="memItemLeft" nowrap align=right valign=top><a name="_p_k___verifier_with_recoverya7" doxytag="PK_VerifierWithRecovery::NewMessageAccumulator"></a>virtual <a class="el" href="class_hash_transformation.html">HashTransformation</a> * </td><td class="memItemRight" valign=bottom><a class="el" href="class_p_k___verifier_with_recovery.html#_p_k___verifier_with_recoverya7">NewMessageAccumulator</a> () const=0</td></tr><tr><td class="mdescLeft"> </td><td class="mdescRight">deprecated, please use <a class="el" href="class_p_k___signer.html#_signer_with_recovery_templatea12">PK_Signer::NewSignatureAccumulator</a> or <a class="el" href="class_p_k___verifier.html#_verifier_with_recovery_templatea15">PK_Verifier::NewVerificationAccumulator</a> instead <br><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_p_k___verifier_with_recovery.html#_verifier_with_recovery_templatea14">SignatureUpfrontForVerification</a> () const</td></tr><tr><td class="memItemLeft" nowrap align=right valign=top>virtual <a class="el" href="class_hash_transformation.html">HashTransformation</a> * </td><td class="memItemRight" valign=bottom><a class="el" href="class_p_k___verifier_with_recovery.html#_verifier_with_recovery_templatea15">NewVerificationAccumulator</a> (const byte *signature=NULL) const</td></tr><tr><td class="mdescLeft"> </td><td class="mdescRight">create a new <a class="el" href="class_hash_transformation.html">HashTransformation</a> to accumulate the message to be verified </em> <a href="#_verifier_with_recovery_templatea15"></a><em><br><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_p_k___verifier_with_recovery.html#_verifier_with_recovery_templatea16">Verify</a> (<a class="el" href="class_hash_transformation.html">HashTransformation</a> *messageAccumulator, const byte *signature=NULL) const</td></tr><tr><td class="mdescLeft"> </td><td class="mdescRight">check whether sig is a valid signature for messageAccumulator, and delete messageAccumulator (even in case of exception thrown) </em> <a href="#_verifier_with_recovery_templatea16"></a><em><br><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_p_k___verifier_with_recovery.html#_p_k___verifier_with_recoverya11">VerifyAndRestart</a> (<a class="el" href="class_hash_transformation.html">HashTransformation</a> &messageAccumulator, const byte *signature) const=0</td></tr><tr><td class="mdescLeft"> </td><td class="mdescRight">check whether sig is a valid signature for messageAccumulator, and restart messageAccumulator </em> <a href="#_p_k___verifier_with_recoverya11"></a><em><br><br></td></tr><tr><td class="memItemLeft" nowrap align=right valign=top><a name="_verifier_with_recovery_templatea17" doxytag="PK_VerifierWithRecovery::InitializeVerificationAccumulator"></a>virtual void </td><td class="memItemRight" valign=bottom><a class="el" href="class_p_k___verifier_with_recovery.html#_verifier_with_recovery_templatea17">InitializeVerificationAccumulator</a> (<a class="el" href="class_hash_transformation.html">HashTransformation</a> &messageAccumulator, const byte *signature) const</td></tr><tr><td class="mdescLeft"> </td><td class="mdescRight">only useful if <a class="el" href="class_p_k___verifier.html#_verifier_with_recovery_templatea14">SignatureUpfrontForVerification()</a> == true <br><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_p_k___verifier_with_recovery.html#_verifier_with_recovery_templatea18">VerifyMessage</a> (const byte *message, unsigned int messageLen, const byte *signature) const</td></tr><tr><td class="mdescLeft"> </td><td class="mdescRight">check whether sig is a valid signature for message </em> <a href="#_verifier_with_recovery_templatea18"></a><em><br><br></td></tr><tr><td class="memItemLeft" nowrap align=right valign=top><a name="_verifier_with_recovery_templatea19" doxytag="PK_VerifierWithRecovery::AccessMaterial"></a><a class="el" href="class_crypto_material.html">CryptoMaterial</a> & </td><td class="memItemRight" valign=bottom><a class="el" href="class_p_k___verifier_with_recovery.html#_verifier_with_recovery_templatea19">AccessMaterial</a> ()</td></tr><tr><td class="mdescLeft"> </td><td class="mdescRight">returns a reference to the crypto material used by this object <br><br></td></tr><tr><td class="memItemLeft" nowrap align=right valign=top><a name="_verifier_with_recovery_templatea20" doxytag="PK_VerifierWithRecovery::GetMaterial"></a>const <a class="el" href="class_crypto_material.html">CryptoMaterial</a> & </td><td class="memItemRight" valign=bottom><a class="el" href="class_p_k___verifier_with_recovery.html#_verifier_with_recovery_templatea20">GetMaterial</a> () const</td></tr><tr><td class="mdescLeft"> </td><td class="mdescRight">returns a const reference to the crypto material used by this object <br><br></td></tr><tr><td class="memItemLeft" nowrap align=right valign=top><a name="_t_f___encryptor_basea10" doxytag="PK_VerifierWithRecovery::AccessPublicKey"></a>virtual <a class="el" href="class_public_key.html">PublicKey</a> & </td><td class="memItemRight" valign=bottom><b>AccessPublicKey</b> ()=0</td></tr><tr><td class="memItemLeft" nowrap align=right valign=top><a name="_verifier_with_recovery_templatea21" doxytag="PK_VerifierWithRecovery::GetPublicKey"></a>virtual const <a class="el" href="class_public_key.html">PublicKey</a> & </td><td class="memItemRight" valign=bottom><b>GetPublicKey</b> () const</td></tr><tr><td class="memItemLeft" nowrap align=right valign=top><a name="_x_t_r___d_ha24" doxytag="PK_VerifierWithRecovery::BERDecode"></a>void </td><td class="memItemRight" valign=bottom><a class="el" href="class_p_k___verifier_with_recovery.html#_x_t_r___d_ha24">BERDecode</a> (<a class="el" href="class_buffered_transformation.html">BufferedTransformation</a> &bt)</td></tr><tr><td class="mdescLeft"> </td><td class="mdescRight">for backwards compatibility, calls <a class="el" href="class_asymmetric_algorithm.html#_asymmetric_algorithma0">AccessMaterial()</a>.Load(bt) <br><br></td></tr><tr><td class="memItemLeft" nowrap align=right valign=top><a name="_verifier_with_recovery_templatea23" doxytag="PK_VerifierWithRecovery::DEREncode"></a>void </td><td class="memItemRight" valign=bottom><a class="el" href="class_p_k___verifier_with_recovery.html#_verifier_with_recovery_templatea23">DEREncode</a> (<a class="el" href="class_buffered_transformation.html">BufferedTransformation</a> &bt) const</td></tr><tr><td class="mdescLeft"> </td><td class="mdescRight">for backwards compatibility, calls <a class="el" href="class_asymmetric_algorithm.html#_asymmetric_algorithma1">GetMaterial()</a>.Save(bt) <br><br></td></tr><tr><td class="memItemLeft" nowrap align=right valign=top><a name="_zlib_decompressora17" doxytag="PK_VerifierWithRecovery::AlgorithmName"></a>virtual std::string </td><td class="memItemRight" valign=bottom><a class="el" href="class_p_k___verifier_with_recovery.html#_zlib_decompressora17">AlgorithmName</a> () const</td></tr><tr><td class="mdescLeft"> </td><td class="mdescRight">returns name of this algorithm, not universally implemented yet <br><br></td></tr><tr><td class="memItemLeft" nowrap align=right valign=top><a name="_zlib_decompressora18" doxytag="PK_VerifierWithRecovery::Clone"></a>virtual <a class="el" href="class_clonable.html">Clonable</a> * </td><td class="memItemRight" valign=bottom><a class="el" href="class_p_k___verifier_with_recovery.html#_zlib_decompressora18">Clone</a> () const</td></tr><tr><td class="mdescLeft"> </td><td class="mdescRight">this is not implemented by most classes yet <br><br></td></tr></table><hr><h2>Member Function Documentation</h2><a name="_p_k___verifier_with_recoverya0" doxytag="PK_VerifierWithRecovery::SignatureUpfrontForRecovery"></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 PK_VerifierWithRecovery::SignatureUpfrontForRecovery </td> <td class="md" valign="top">( </td> <td class="mdname1" valign="top" nowrap> </td> <td class="md" valign="top"> ) </td> <td class="md" nowrap> const<code> [pure virtual]</code></td> </tr> </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td><p>If this function returns true, you must input the signature when calling <a class="el" href="class_p_k___verifier_with_recovery.html#_p_k___verifier_with_recoverya1">NewRecoveryAccumulator()</a>. Otherwise, you must input the signature when calling <a class="el" href="class_p_k___verifier_with_recovery.html#_p_k___verifier_with_recoverya2">Recover()</a>. <p>Implemented in <a class="el" href="class_verifier_with_recovery_template.html#_verifier_with_recovery_templatea5">VerifierWithRecoveryTemplate< TF, H ></a>. </td> </tr></table><a name="_p_k___verifier_with_recoverya2" doxytag="PK_VerifierWithRecovery::Recover"></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 <a class="el" href="struct_decoding_result.html">DecodingResult</a> PK_VerifierWithRecovery::Recover </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">byte * </td> <td class="mdname" nowrap> <em>recoveredMessage</em>, </td> </tr> <tr> <td></td> <td></td> <td class="md" nowrap><a class="el" href="class_hash_transformation.html">HashTransformation</a> * </td> <td class="mdname" nowrap> <em>recoveryAccumulator</em>, </td> </tr> <tr> <td></td> <td></td> <td class="md" nowrap>const byte * </td> <td class="mdname" nowrap> <em>signature</em> = NULL</td> </tr> <tr> <td></td> <td class="md">) </td> <td class="md" colspan="2"> const<code> [pure virtual]</code></td> </tr> </table> </td> </tr></table>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -