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

📄 rw_8h-source.html

📁 著名的密码库Crypto++的文档 C++语言的杰作。程序员必备。
💻 HTML
📖 第 1 页 / 共 2 页
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8"><title>Crypto++: rw.h Source File</title><link href="doxygen.css" rel="stylesheet" type="text/css"><link href="tabs.css" rel="stylesheet" type="text/css"></head><body><!-- Generated by Doxygen 1.5.2 --><div class="tabs">  <ul>    <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>    <li><a href="namespaces.html"><span>Namespaces</span></a></li>    <li><a href="classes.html"><span>Classes</span></a></li>    <li class="current"><a href="files.html"><span>Files</span></a></li>  </ul></div><div class="tabs">  <ul>    <li><a href="files.html"><span>File&nbsp;List</span></a></li>    <li><a href="globals.html"><span>File&nbsp;Members</span></a></li>  </ul></div><h1>rw.h</h1><a href="rw_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="preprocessor">#ifndef CRYPTOPP_RW_H</span><a name="l00002"></a>00002 <span class="preprocessor"></span><span class="preprocessor">#define CRYPTOPP_RW_H</span><a name="l00003"></a>00003 <span class="preprocessor"></span><span class="comment"></span><a name="l00004"></a>00004 <span class="comment">/** \file</span><a name="l00005"></a>00005 <span class="comment">        This file contains classes that implement the</span><a name="l00006"></a>00006 <span class="comment">        Rabin-Williams signature schemes as defined in IEEE P1363.</span><a name="l00007"></a>00007 <span class="comment">*/</span><a name="l00008"></a>00008 <a name="l00009"></a>00009 <span class="preprocessor">#include "<a class="code" href="pubkey_8h.html" title="This file contains helper classes/functions for implementing public key algorithms...">pubkey.h</a>"</span><a name="l00010"></a>00010 <a name="l00011"></a>00011 NAMESPACE_BEGIN(CryptoPP)<a name="l00012"></a>00012 <a name="l00013"></a>00013 <span class="comment">//! _</span><a name="l00014"></a><a class="code" href="class_r_w_function.html">00014</a> <span class="comment"></span>class CRYPTOPP_DLL <a class="code" href="class_r_w_function.html" title="_">RWFunction</a> : public <a class="code" href="class_trapdoor_function.html" title="_">TrapdoorFunction</a>, public <a class="code" href="class_public_key.html" title="interface for public keys">PublicKey</a><a name="l00015"></a>00015 {<a name="l00016"></a>00016         <span class="keyword">typedef</span> <a class="code" href="class_r_w_function.html" title="_">RWFunction</a> <a class="code" href="class_r_w_function.html" title="_">ThisClass</a>;<a name="l00017"></a>00017 <a name="l00018"></a>00018 <span class="keyword">public</span>:<a name="l00019"></a><a class="code" href="class_r_w_function.html#614204219fea42197352b8456ef0b7c5">00019</a>         <span class="keywordtype">void</span> Initialize(<span class="keyword">const</span> <a class="code" href="class_integer.html" title="multiple precision integer and basic arithmetics">Integer</a> &amp;n)<a name="l00020"></a>00020                 {m_n = n;}<a name="l00021"></a>00021 <a name="l00022"></a>00022         <span class="keywordtype">void</span> BERDecode(<a class="code" href="class_buffered_transformation.html" title="interface for buffered transformations">BufferedTransformation</a> &amp;bt);<a name="l00023"></a>00023         <span class="keywordtype">void</span> DEREncode(<a class="code" href="class_buffered_transformation.html" title="interface for buffered transformations">BufferedTransformation</a> &amp;bt) <span class="keyword">const</span>;<a name="l00024"></a>00024 <a name="l00025"></a>00025         <a class="code" href="class_integer.html" title="multiple precision integer and basic arithmetics">Integer</a> ApplyFunction(<span class="keyword">const</span> <a class="code" href="class_integer.html" title="multiple precision integer and basic arithmetics">Integer</a> &amp;x) <span class="keyword">const</span>;<a name="l00026"></a><a class="code" href="class_r_w_function.html#3133e8d2cbbf5c44925c088fa30f2157">00026</a>         <a class="code" href="class_integer.html" title="multiple precision integer and basic arithmetics">Integer</a> PreimageBound()<span class="keyword"> const </span>{<span class="keywordflow">return</span> ++(m_n&gt;&gt;1);}<a name="l00027"></a><a class="code" href="class_r_w_function.html#53ac54d4f007c7eddd2b4c771c16b0ea">00027</a>         <a class="code" href="class_integer.html" title="multiple precision integer and basic arithmetics">Integer</a> ImageBound()<span class="keyword"> const </span>{<span class="keywordflow">return</span> m_n;}<a name="l00028"></a>00028 <a name="l00029"></a>00029         <span class="keywordtype">bool</span> Validate(<a class="code" href="class_random_number_generator.html" title="interface for random number generators">RandomNumberGenerator</a> &amp;rng, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> level) <span class="keyword">const</span>;<a name="l00030"></a>00030         <span class="keywordtype">bool</span> GetVoidValue(<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>;<a name="l00031"></a>00031         <span class="keywordtype">void</span> AssignFrom(<span class="keyword">const</span> <a class="code" href="class_name_value_pairs.html" title="interface for retrieving values given their names">NameValuePairs</a> &amp;source);<a name="l00032"></a>00032 <a name="l00033"></a><a class="code" href="class_r_w_function.html#1476f3beb5848f37216f67778df3eb6e">00033</a>         <span class="keyword">const</span> <a class="code" href="class_integer.html" title="multiple precision integer and basic arithmetics">Integer</a>&amp; GetModulus()<span class="keyword"> const </span>{<span class="keywordflow">return</span> m_n;}<a name="l00034"></a><a class="code" href="class_r_w_function.html#5df5efb3885c607ca331929be9938546">00034</a>         <span class="keywordtype">void</span> SetModulus(<span class="keyword">const</span> <a class="code" href="class_integer.html" title="multiple precision integer and basic arithmetics">Integer</a> &amp;n) {m_n = n;}<a name="l00035"></a>00035 <a name="l00036"></a>00036 <span class="keyword">protected</span>:<a name="l00037"></a><a class="code" href="class_r_w_function.html#21b3158cafdb7121e6305b742ffb340f">00037</a>         <a class="code" href="class_integer.html" title="multiple precision integer and basic arithmetics">Integer</a> m_n;<a name="l00038"></a>00038 };<a name="l00039"></a>00039 <span class="comment"></span>

⌨️ 快捷键说明

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