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

📄 class_p_k___verifier.html

📁 Crypto++是一个非常强大的密码学库,主要是功能全
💻 HTML
📖 第 1 页 / 共 2 页
字号:
<!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_Verifier 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&nbsp;Page</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class&nbsp;Hierarchy</a> | <a class="qindex" href="classes.html">Alphabetical&nbsp;List</a> | <a class="qindex" href="annotated.html">Compound&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="namespacemembers.html">Namespace&nbsp;Members</a> | <a class="qindex" href="functions.html">Compound&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a></div><h1>PK_Verifier Class Reference</h1><code>#include &lt;<a class="el" href="cryptlib_8h-source.html">cryptlib.h</a>&gt;</code><p><p>Inheritance diagram for PK_Verifier:<p><center><img src="class_p_k___verifier.png" usemap="#PK_Verifier_map" border="0" alt=""></center><map name="PK_Verifier_map"><area href="class_p_k___signature_scheme.html" alt="PK_SignatureScheme" shape="rect" coords="0,168,357,192"><area href="class_public_key_algorithm.html" alt="PublicKeyAlgorithm" shape="rect" coords="367,168,724,192"><area href="class_asymmetric_algorithm.html" alt="AsymmetricAlgorithm" shape="rect" coords="367,112,724,136"><area href="class_algorithm.html" alt="Algorithm" shape="rect" coords="367,56,724,80"><area href="class_clonable.html" alt="Clonable" shape="rect" coords="367,0,724,24"><area href="class_p_k___signature_scheme_base.html" alt="PK_SignatureSchemeBase< H, PK_Verifier, DigestVerifier >" shape="rect" coords="0,280,357,304"><area href="class_p_k___verifier_with_recovery.html" alt="PK_VerifierWithRecovery" shape="rect" coords="367,280,724,304"><area href="class_p_k___verifier_base.html" alt="PK_VerifierBase< H >" shape="rect" coords="0,336,357,360"><area href="class_verifier_with_recovery_template.html" alt="VerifierWithRecoveryTemplate< TF, H >" shape="rect" coords="367,336,724,360"><area href="class_p_k___signature_scheme_impl.html" alt="PK_SignatureSchemeImpl< PK_VerifierBase< H >, DS >" shape="rect" coords="0,392,357,416"><area href="class_p_k___verifier_impl.html" alt="PK_VerifierImpl< DS, H >" shape="rect" coords="0,448,357,472"></map><a href="class_p_k___verifier-members.html">List of all members.</a><hr><a name="_details"></a><h2>Detailed Description</h2>interface for public-key signature verifiers <p><p>Definition at line <a class="el" href="cryptlib_8h-source.html#l01262">1262</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&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="class_p_k___verifier.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> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="class_p_k___verifier.html#_verifier_with_recovery_templatea15">NewVerificationAccumulator</a> (const byte *signature=NULL) const</td></tr><tr><td class="mdescLeft">&nbsp;</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&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="class_p_k___verifier.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">&nbsp;</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&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="class_p_k___verifier.html#_p_k___verifier_with_recoverya11">VerifyAndRestart</a> (<a class="el" href="class_hash_transformation.html">HashTransformation</a> &amp;messageAccumulator, const byte *signature) const=0</td></tr><tr><td class="mdescLeft">&nbsp;</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_Verifier::InitializeVerificationAccumulator"></a>virtual void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="class_p_k___verifier.html#_verifier_with_recovery_templatea17">InitializeVerificationAccumulator</a> (<a class="el" href="class_hash_transformation.html">HashTransformation</a> &amp;messageAccumulator, const byte *signature) const</td></tr><tr><td class="mdescLeft">&nbsp;</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&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="class_p_k___verifier.html#_verifier_with_recovery_templatea18">VerifyMessage</a> (const byte *message, unsigned int messageLen, const byte *signature) const</td></tr><tr><td class="mdescLeft">&nbsp;</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="_p_k___verifier_with_recoverya6" doxytag="PK_Verifier::SignatureLength"></a>virtual unsigned int&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="class_p_k___verifier.html#_p_k___verifier_with_recoverya6">SignatureLength</a> () const=0</td></tr><tr><td class="mdescLeft">&nbsp;</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_Verifier::NewMessageAccumulator"></a>virtual <a class="el" href="class_hash_transformation.html">HashTransformation</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="class_p_k___verifier.html#_p_k___verifier_with_recoverya7">NewMessageAccumulator</a> () const=0</td></tr><tr><td class="mdescLeft">&nbsp;</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><a name="_verifier_with_recovery_templatea19" doxytag="PK_Verifier::AccessMaterial"></a><a class="el" href="class_crypto_material.html">CryptoMaterial</a> &amp;&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="class_p_k___verifier.html#_verifier_with_recovery_templatea19">AccessMaterial</a> ()</td></tr><tr><td class="mdescLeft">&nbsp;</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_Verifier::GetMaterial"></a>const <a class="el" href="class_crypto_material.html">CryptoMaterial</a> &amp;&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="class_p_k___verifier.html#_verifier_with_recovery_templatea20">GetMaterial</a> () const</td></tr><tr><td class="mdescLeft">&nbsp;</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_Verifier::AccessPublicKey"></a>virtual <a class="el" href="class_public_key.html">PublicKey</a> &amp;&nbsp;</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_Verifier::GetPublicKey"></a>virtual const <a class="el" href="class_public_key.html">PublicKey</a> &amp;&nbsp;</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_Verifier::BERDecode"></a>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="class_p_k___verifier.html#_x_t_r___d_ha24">BERDecode</a> (<a class="el" href="class_buffered_transformation.html">BufferedTransformation</a> &amp;bt)</td></tr><tr><td class="mdescLeft">&nbsp;</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_Verifier::DEREncode"></a>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="class_p_k___verifier.html#_verifier_with_recovery_templatea23">DEREncode</a> (<a class="el" href="class_buffered_transformation.html">BufferedTransformation</a> &amp;bt) const</td></tr><tr><td class="mdescLeft">&nbsp;</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_Verifier::AlgorithmName"></a>virtual std::string&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="class_p_k___verifier.html#_zlib_decompressora17">AlgorithmName</a> () const</td></tr><tr><td class="mdescLeft">&nbsp;</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_Verifier::Clone"></a>virtual <a class="el" href="class_clonable.html">Clonable</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="class_p_k___verifier.html#_zlib_decompressora18">Clone</a> () const</td></tr><tr><td class="mdescLeft">&nbsp;</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="_verifier_with_recovery_templatea14" doxytag="PK_Verifier::SignatureUpfrontForVerification"></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_Verifier::SignatureUpfrontForVerification </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="mdname1" valign="top" nowrap>          </td>          <td class="md" valign="top">&nbsp;)&nbsp;</td>          <td class="md" nowrap> const<code> [inline, virtual]</code></td>        </tr>      </table>    </td>  </tr></table><table cellspacing=5 cellpadding=0 border=0>  <tr>    <td>      &nbsp;    </td>    <td><p>If this function returns true, you must input the signature when calling <a class="el" href="class_p_k___verifier.html#_verifier_with_recovery_templatea15">NewVerificationAccumulator()</a>. Otherwise, you must input the signature when calling <a class="el" href="class_p_k___verifier.html#_verifier_with_recovery_templatea16">Verify()</a>. <p>Definition at line <a class="el" href="cryptlib_8h-source.html#l01268">1268</a> of file <a class="el" href="cryptlib_8h-source.html">cryptlib.h</a>.    </td>  </tr></table><a name="_verifier_with_recovery_templatea15" doxytag="PK_Verifier::NewVerificationAccumulator"></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="class_hash_transformation.html">HashTransformation</a>* PK_Verifier::NewVerificationAccumulator </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top">const byte *&nbsp;</td>          <td class="mdname1" valign="top" nowrap> <em>signature</em> = NULL          </td>          <td class="md" valign="top">&nbsp;)&nbsp;</td>          <td class="md" nowrap> const<code> [inline, virtual]</code></td>        </tr>      </table>    </td>  </tr></table><table cellspacing=5 cellpadding=0 border=0>  <tr>    <td>      &nbsp;    </td>    <td><p>create a new <a class="el" href="class_hash_transformation.html">HashTransformation</a> to accumulate the message to be verified <p><dl compact><dt><b>Parameters:</b></dt><dd>  <table border="0" cellspacing="2" cellpadding="0">    <tr><td valign=top><em>signature</em>&nbsp;</td><td>is ignored if <a class="el" href="class_p_k___verifier.html#_verifier_with_recovery_templatea14">SignatureUpfrontForVerification()</a> == false </td></tr>    <tr><td valign=top><em>signature</em>&nbsp;</td><td>may be NULL to indicate that the signature is not available yet</td></tr>  </table></dl><p>Definition at line <a class="el" href="cryptlib_8h-source.html#l01274">1274</a> of file <a class="el" href="cryptlib_8h-source.html">cryptlib.h</a>.<p>References <a class="el" href="class_p_k___signature_scheme.html#_p_k___verifier_with_recoverya7">PK_SignatureScheme::NewMessageAccumulator()</a>.<p>Referenced by <a class="el" href="cryptlib_8cpp-source.html#l00638">VerifyMessage()</a>.    </td>  </tr></table>

⌨️ 快捷键说明

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