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

📄 esign_8h-source.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++: esign.h Source File</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>esign.h</h1><a href="esign_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre>00001 <span class="preprocessor">#ifndef CRYPTOPP_ESIGN_H</span>00002 <span class="preprocessor"></span><span class="preprocessor">#define CRYPTOPP_ESIGN_H</span>00003 <span class="preprocessor"></span><span class="comment"></span>00004 <span class="comment">/** \file</span>00005 <span class="comment">        This file contains classes that implement the</span>00006 <span class="comment">        ESIGN signature schemes as defined in IEEE P1363a.</span>00007 <span class="comment">*/</span>00008 00009 <span class="preprocessor">#include "<a class="code" href="pubkey_8h.html">pubkey.h</a>"</span>00010 <span class="preprocessor">#include "<a class="code" href="integer_8h.html">integer.h</a>"</span>00011 00012 NAMESPACE_BEGIN(CryptoPP)00013 00014 <span class="comment">//! .</span><a name="l00015"></a><a class="code" href="class_e_s_i_g_n_function.html">00015</a> <span class="comment"></span><span class="keyword">class </span><a class="code" href="class_e_s_i_g_n_function.html">ESIGNFunction</a> : <span class="keyword">public</span> <a class="code" href="class_trapdoor_function.html">TrapdoorFunction</a>, <span class="keyword">public</span> <a class="code" href="class_public_key.html">PublicKey</a>, <span class="keyword">public</span> <a class="code" href="class_a_s_n1_crypto_material.html">ASN1CryptoMaterial</a>00016 {00017         <span class="keyword">typedef</span> <a class="code" href="class_e_s_i_g_n_function.html">ESIGNFunction</a> <a class="code" href="class_e_s_i_g_n_function.html">ThisClass</a>;00018 00019 <span class="keyword">public</span>:00020         <span class="keywordtype">void</span> Initialize(<span class="keyword">const</span> <a class="code" href="class_integer.html">Integer</a> &amp;n, <span class="keyword">const</span> <a class="code" href="class_integer.html">Integer</a> &amp;e)00021                 {m_n = n; m_e = e;}00022 00023         <span class="comment">// PublicKey</span>00024         <span class="keywordtype">void</span> <a class="code" href="class_e_s_i_g_n_function.html#_e_s_i_g_n_functiona1">BERDecode</a>(<a class="code" href="class_buffered_transformation.html">BufferedTransformation</a> &amp;bt);00025         <span class="keywordtype">void</span> <a class="code" href="class_e_s_i_g_n_function.html#_e_s_i_g_n_functiona2">DEREncode</a>(<a class="code" href="class_buffered_transformation.html">BufferedTransformation</a> &amp;bt) <span class="keyword">const</span>;00026 00027         <span class="comment">// CryptoMaterial</span>00028         <span class="keywordtype">bool</span> <a class="code" href="class_e_s_i_g_n_function.html#_e_s_i_g_n_functiona3">Validate</a>(<a class="code" href="class_random_number_generator.html">RandomNumberGenerator</a> &amp;rng, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> level) <span class="keyword">const</span>;00029         <span class="keywordtype">bool</span> <a class="code" href="class_e_s_i_g_n_function.html#_e_s_i_g_n_functiona4">GetVoidValue</a>(<span class="keyword">const</span> <span class="keywordtype">char</span> *name, <span class="keyword">const</span> std::type_info &amp;valueType, <span class="keywordtype">void</span> *pValue) <span class="keyword">const</span>;00030         <span class="keywordtype">void</span> <a class="code" href="class_e_s_i_g_n_function.html#_e_s_i_g_n_functiona5">AssignFrom</a>(<span class="keyword">const</span> <a class="code" href="class_name_value_pairs.html">NameValuePairs</a> &amp;source);00031 00032         <span class="comment">// TrapdoorFunction</span>00033         <a class="code" href="class_integer.html">Integer</a> ApplyFunction(<span class="keyword">const</span> <a class="code" href="class_integer.html">Integer</a> &amp;x) <span class="keyword">const</span>;00034         <a class="code" href="class_integer.html">Integer</a> PreimageBound()<span class="keyword"> const </span>{<span class="keywordflow">return</span> m_n;}00035         <a class="code" href="class_integer.html">Integer</a> ImageBound()<span class="keyword"> const </span>{<span class="keywordflow">return</span> <a class="code" href="class_integer.html#_integerz37_13">Integer::Power2</a>(GetK());}00036 00037         <span class="comment">// non-derived</span>00038         <span class="keyword">const</span> <a class="code" href="class_integer.html">Integer</a> &amp; GetModulus()<span class="keyword"> const </span>{<span class="keywordflow">return</span> m_n;}00039         <span class="keyword">const</span> <a class="code" href="class_integer.html">Integer</a> &amp; GetPublicExponent()<span class="keyword"> const </span>{<span class="keywordflow">return</span> m_e;}00040 00041         <span class="keywordtype">void</span> SetModulus(<span class="keyword">const</span> <a class="code" href="class_integer.html">Integer</a> &amp;n) {m_n = n;}00042         <span class="keywordtype">void</span> SetPublicExponent(<span class="keyword">const</span> <a class="code" href="class_integer.html">Integer</a> &amp;e) {m_e = e;}00043 00044 <span class="keyword">protected</span>:00045         <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> GetK()<span class="keyword"> const </span>{<span class="keywordflow">return</span> m_n.<a class="code" href="class_integer.html#_integerz41_2">BitCount</a>()/3-1;}00046 00047         <a class="code" href="class_integer.html">Integer</a> m_n, m_e;00048 };00049 <span class="comment"></span>00050 <span class="comment">//! .</span><a name="l00051"></a><a class="code" href="class_invertible_e_s_i_g_n_function.html">00051</a> <span class="comment"></span><span class="keyword">class </span><a class="code" href="class_invertible_e_s_i_g_n_function.html">InvertibleESIGNFunction</a> : <span class="keyword">public</span> <a class="code" href="class_e_s_i_g_n_function.html">ESIGNFunction</a>, <span class="keyword">public</span> <a class="code" href="class_randomized_trapdoor_function_inverse.html">RandomizedTrapdoorFunctionInverse</a>, <span class="keyword">public</span> <a class="code" href="class_private_key.html">PrivateKey</a>00052 {00053         <span class="keyword">typedef</span> <a class="code" href="class_invertible_e_s_i_g_n_function.html">InvertibleESIGNFunction</a> <a class="code" href="class_invertible_e_s_i_g_n_function.html">ThisClass</a>;00054 00055 <span class="keyword">public</span>:00056         <span class="keywordtype">void</span> Initialize(<span class="keyword">const</span> <a class="code" href="class_integer.html">Integer</a> &amp;n, <span class="keyword">const</span> <a class="code" href="class_integer.html">Integer</a> &amp;e, <span class="keyword">const</span> <a class="code" href="class_integer.html">Integer</a> &amp;p, <span class="keyword">const</span> <a class="code" href="class_integer.html">Integer</a> &amp;q)00057                 {m_n = n; m_e = e; m_p = p; m_q = q;}00058         <span class="comment">// generate a random private key</span>00059         <span class="keywordtype">void</span> Initialize(<a class="code" href="class_random_number_generator.html">RandomNumberGenerator</a> &amp;rng, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> modulusBits)00060                 {<a class="code" href="class_generatable_crypto_material.html#_x_t_r___d_ha28">GenerateRandomWithKeySize</a>(rng, modulusBits);}00061 00062         <span class="keywordtype">void</span> <a class="code" href="class_invertible_e_s_i_g_n_function.html#_invertible_e_s_i_g_n_functiona2">BERDecode</a>(<a class="code" href="class_buffered_transformation.html">BufferedTransformation</a> &amp;bt);00063         <span class="keywordtype">void</span> <a class="code" href="class_invertible_e_s_i_g_n_function.html#_invertible_e_s_i_g_n_functiona3">DEREncode</a>(<a class="code" href="class_buffered_transformation.html">BufferedTransformation</a> &amp;bt) <span class="keyword">const</span>;00064 

⌨️ 快捷键说明

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