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

📄 pubkey_8h-source.html

📁 著名的密码库Crypto++的文档 C++语言的杰作。程序员必备。
💻 HTML
📖 第 1 页 / 共 5 页
字号:
<a name="l00235"></a>00235 <a name="l00236"></a>00236         <span class="comment">// VC60 workaround</span><a name="l00237"></a><a class="code" href="struct_p_k___signature_message_encoding_method_1_1_hash_identifier_lookup.html">00237</a>         <span class="keyword">struct </span><a class="code" href="struct_p_k___signature_message_encoding_method_1_1_hash_identifier_lookup.html">HashIdentifierLookup</a><a name="l00238"></a>00238         {<a name="l00239"></a><a class="code" href="struct_p_k___signature_message_encoding_method_1_1_hash_identifier_lookup_1_1_hash_identifier_lookup2.html">00239</a>                 <span class="keyword">template</span> &lt;<span class="keyword">class</span> H&gt; <span class="keyword">struct </span><a class="code" href="struct_p_k___signature_message_encoding_method_1_1_hash_identifier_lookup_1_1_hash_identifier_lookup2.html">HashIdentifierLookup2</a><a name="l00240"></a>00240                 {<a name="l00241"></a><a class="code" href="struct_p_k___signature_message_encoding_method_1_1_hash_identifier_lookup_1_1_hash_identifier_lookup2.html#dd42b83bc1f02c1f78794b00132022e7">00241</a>                         <span class="keyword">static</span> <a class="code" href="pubkey_8h.html#ef874ed3f2d212ac4629255c8ef86dd0">HashIdentifier</a> CRYPTOPP_API Lookup()<a name="l00242"></a>00242                         {<a name="l00243"></a>00243                                 <span class="keywordflow">return</span> <a class="code" href="pubkey_8h.html#ef874ed3f2d212ac4629255c8ef86dd0">HashIdentifier</a>(NULL, 0);<a name="l00244"></a>00244                         }<a name="l00245"></a>00245                 };<a name="l00246"></a>00246         };<a name="l00247"></a>00247 };<a name="l00248"></a>00248 <a name="l00249"></a><a class="code" href="class_p_k___deterministic_signature_message_encoding_method.html">00249</a> <span class="keyword">class </span>CRYPTOPP_DLL CRYPTOPP_NO_VTABLE PK_DeterministicSignatureMessageEncodingMethod : <span class="keyword">public</span> PK_SignatureMessageEncodingMethod<a name="l00250"></a>00250 {<a name="l00251"></a>00251 <span class="keyword">public</span>:<a name="l00252"></a>00252         <span class="keywordtype">bool</span> VerifyMessageRepresentative(<a name="l00253"></a>00253                 <a class="code" href="class_hash_transformation.html" title="interface for hash functions and data processing part of MACs">HashTransformation</a> &amp;hash, <a class="code" href="pubkey_8h.html#ef874ed3f2d212ac4629255c8ef86dd0">HashIdentifier</a> hashIdentifier, <span class="keywordtype">bool</span> messageEmpty,<a name="l00254"></a>00254                 byte *representative, <span class="keywordtype">size_t</span> representativeBitLength) <span class="keyword">const</span>;<a name="l00255"></a>00255 };<a name="l00256"></a>00256 <a name="l00257"></a><a class="code" href="class_p_k___recoverable_signature_message_encoding_method.html">00257</a> <span class="keyword">class </span>CRYPTOPP_DLL CRYPTOPP_NO_VTABLE PK_RecoverableSignatureMessageEncodingMethod : <span class="keyword">public</span> PK_SignatureMessageEncodingMethod<a name="l00258"></a>00258 {<a name="l00259"></a>00259 <span class="keyword">public</span>:<a name="l00260"></a>00260         <span class="keywordtype">bool</span> VerifyMessageRepresentative(<a name="l00261"></a>00261                 <a class="code" href="class_hash_transformation.html" title="interface for hash functions and data processing part of MACs">HashTransformation</a> &amp;hash, <a class="code" href="pubkey_8h.html#ef874ed3f2d212ac4629255c8ef86dd0">HashIdentifier</a> hashIdentifier, <span class="keywordtype">bool</span> messageEmpty,<a name="l00262"></a>00262                 byte *representative, <span class="keywordtype">size_t</span> representativeBitLength) <span class="keyword">const</span>;<a name="l00263"></a>00263 };<a name="l00264"></a>00264 <a name="l00265"></a><a class="code" href="class_d_l___signature_message_encoding_method___d_s_a.html">00265</a> <span class="keyword">class </span>CRYPTOPP_DLL DL_SignatureMessageEncodingMethod_DSA : <span class="keyword">public</span> PK_DeterministicSignatureMessageEncodingMethod<a name="l00266"></a>00266 {<a name="l00267"></a>00267 <span class="keyword">public</span>:<a name="l00268"></a>00268         <span class="keywordtype">void</span> ComputeMessageRepresentative(<a class="code" href="class_random_number_generator.html" title="interface for random number generators">RandomNumberGenerator</a> &amp;rng, <a name="l00269"></a>00269                 <span class="keyword">const</span> byte *recoverableMessage, <span class="keywordtype">size_t</span> recoverableMessageLength,<a name="l00270"></a>00270                 <a class="code" href="class_hash_transformation.html" title="interface for hash functions and data processing part of MACs">HashTransformation</a> &amp;hash, <a class="code" href="pubkey_8h.html#ef874ed3f2d212ac4629255c8ef86dd0">HashIdentifier</a> hashIdentifier, <span class="keywordtype">bool</span> messageEmpty,<a name="l00271"></a>00271                 byte *representative, <span class="keywordtype">size_t</span> representativeBitLength) <span class="keyword">const</span>;<a name="l00272"></a>00272 };<a name="l00273"></a>00273 <a name="l00274"></a><a class="code" href="class_d_l___signature_message_encoding_method___n_r.html">00274</a> <span class="keyword">class </span>CRYPTOPP_DLL DL_SignatureMessageEncodingMethod_NR : <span class="keyword">public</span> PK_DeterministicSignatureMessageEncodingMethod<a name="l00275"></a>00275 {<a name="l00276"></a>00276 <span class="keyword">public</span>:<a name="l00277"></a>00277         <span class="keywordtype">void</span> ComputeMessageRepresentative(<a class="code" href="class_random_number_generator.html" title="interface for random number generators">RandomNumberGenerator</a> &amp;rng, <a name="l00278"></a>00278                 <span class="keyword">const</span> byte *recoverableMessage, <span class="keywordtype">size_t</span> recoverableMessageLength,<a name="l00279"></a>00279                 <a class="code" href="class_hash_transformation.html" title="interface for hash functions and data processing part of MACs">HashTransformation</a> &amp;hash, <a class="code" href="pubkey_8h.html#ef874ed3f2d212ac4629255c8ef86dd0">HashIdentifier</a> hashIdentifier, <span class="keywordtype">bool</span> messageEmpty,<a name="l00280"></a>00280                 byte *representative, <span class="keywordtype">size_t</span> representativeBitLength) <span class="keyword">const</span>;<a name="l00281"></a>00281 };<a name="l00282"></a>00282 <a name="l00283"></a><a class="code" href="class_p_k___message_accumulator_base.html">00283</a> <span class="keyword">class </span>CRYPTOPP_DLL CRYPTOPP_NO_VTABLE PK_MessageAccumulatorBase : <span class="keyword">public</span> <a class="code" href="class_p_k___message_accumulator.html" title="interface for accumulating messages to be signed or verified">PK_MessageAccumulator</a><a name="l00284"></a>00284 {<a name="l00285"></a>00285 <span class="keyword">public</span>:<a name="l00286"></a><a class="code" href="class_p_k___message_accumulator_base.html#32d7a2bc23a2db0faecac23a13908534">00286</a>         PK_MessageAccumulatorBase() : m_empty(true) {}<a name="l00287"></a>00287 <a name="l00288"></a>00288         <span class="keyword">virtual</span> <a class="code" href="class_hash_transformation.html" title="interface for hash functions and data processing part of MACs">HashTransformation</a> &amp; AccessHash() =0;<a name="l00289"></a>00289 <a name="l00290"></a><a class="code" href="class_p_k___message_accumulator_base.html#4dbe89c39bb43b5ce822e6db13a0dd1f">00290</a>         <span class="keywordtype">void</span> <a class="code" href="class_hash_transformation.html#afabefaf445b65d3ba0d8e1c0294afe5" title="process more input">Update</a>(<span class="keyword">const</span> byte *input, <span class="keywordtype">size_t</span> length)<a name="l00291"></a>00291         {<a name="l00292"></a>00292                 AccessHash().Update(input, length);<a name="l00293"></a>00293                 m_empty = m_empty &amp;&amp; length == 0;<a name="l00294"></a>00294         }<a name="l00295"></a>00295 <a name="l00296"></a><a class="code" href="class_p_k___message_accumulator_base.html#80c5888ebcacfcdf50f950ebba950209">00296</a>         <a class="code" href="class_sec_block.html" title="a block of memory allocated using A">SecByteBlock</a> m_recoverableMessage, m_representative, m_presignature, m_semisignature;<a name="l00297"></a><a class="code" href="class_p_k___message_accumulator_base.html#0886827aa3335610a8bb412e90744fd8">00297</a>         <a class="code" href="class_integer.html" title="multiple precision integer and basic arithmetics">Integer</a> m_k, m_s;<a name="l00298"></a><a class="code" href="class_p_k___message_accumulator_base.html#6d0a3ce0258e928c8fb146989a6a7884">00298</a>         <span class="keywordtype">bool</span> m_empty;<a name="l00299"></a>00299 };<a name="l00300"></a>00300 <a name="l00301"></a>00301 <span class="keyword">template</span> &lt;<span class="keyword">class</span> HASH_ALGORITHM&gt;<a name="l00302"></a><a class="code" href="class_p_k___message_accumulator_impl.html">00302</a> <span class="keyword">class </span><a class="code" href="class_p_k___message_accumulator_impl.html">PK_MessageAccumulatorImpl</a> : <span class="keyword">public</span> <a class="code" href="class_p_k___message_accumulator_base.html#32d7a2bc23a2db0faecac23a13908534">PK_MessageAccumulatorBase</a>, <span class="keyword">protected</span> <a class="code" href="class_object_holder.html">ObjectHolder</a>&lt;HASH_ALGORITHM&gt;<a name="l00303"></a>00303 {<a name="l00304"></a>00304 <span class="keyword">public</span>:<a name="l00305"></a><a class="code" href="class_p_k___message_accumulator_impl.html#8c36c8e0ae73d819234a4f71863143b7">00305</a>         <a class="code" href="class_hash_transformation.html" title="interface for hash functions and data processing part of MACs">HashTransformation</a> &amp; <a class="code" href="class_p_k___message_accumulator_impl.html#8c36c8e0ae73d819234a4f71863143b7">AccessHash</a>() {<span class="keywordflow">return</span> this-&gt;<a class="code" href="class_object_holder.html#154db246b0eb9b9fd2c406b828d31c98">m_object</a>;}<a name="l00306"></a>00306 };<a name="l00307"></a>00307 <span class="comment"></span><a name="l00308"></a>00308 <span class="comment">//! _</span><a name="l00309"></a>00309 <span class="comment"></span><span class="keyword">template</span> &lt;<span class="keyword">class</span> INTERFACE, <span class="keyword">class</span> BASE&gt;<a name="l00310"></a><a class="code" href="class_t_f___signature_scheme_base.html">00310</a> <span class="keyword">class </span>CRYPTOPP_NO_VTABLE TF_SignatureSchemeBase : <span class="keyword">public</span> INTERFACE, <span class="keyword">protected</span> BASE<a name="l00311"></a>00311 {<a name="l00312"></a>00312 <span class="keyword">public</span>:<a name="l00313"></a><a class="code" href="class_t_f___signature_scheme_base.html#206919065f471c351afa3c1e04acb6a8">00313</a>         <span class="keywordtype">size_t</span> SignatureLength()<span class="keyword"> const </span><a name="l00314"></a>00314 <span class="keyword">                </span>{<span class="keywordflow">return</span> this-&gt;GetTrapdoorFunctionBounds().MaxPreimage().ByteCount();}<a name="l00315"></a><a class="code" href="class_t_f___signature_scheme_base.html#dc3ec84462aecf2cab21999aff5f0904">00315</a>         <span class="keywordtype">size_t</span> MaxRecoverableLength()<span class="keyword"> const </span><a name="l00316"></a>00316 <span class="keyword">                </span>{<span class="keywordflow">return</span> this-&gt;GetMessageEncodingInterface().MaxRecoverableLength(MessageRepresentativeBitLength(), GetHashIdentifier().second, GetDigestSize());}<a name="l00317"></a><a class="code" href="class_t_f___signature_scheme_base.html#f7a486e575d871dbcbd7dc6af33f1305">00317</a>         <span class="keywordtype">size_t</span> MaxRecoverableLengthFromSignatureLength(<span class="keywordtype">size_t</span> signatureLength)<span class="keyword"> const</span><a name="l00318"></a>00318 <span class="keyword">                </span>{<span class="keywordflow">return</span> this-&gt;MaxRecoverableLength();}<a name="l00319"></a>00319 

⌨️ 快捷键说明

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