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

📄 luc_8h-source.html

📁 著名的密码库Crypto++的文档 C++语言的杰作。程序员必备。
💻 HTML
📖 第 1 页 / 共 4 页
字号:
<!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++: luc.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>luc.h</h1><a href="luc_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_LUC_H</span><a name="l00002"></a>00002 <span class="preprocessor"></span><span class="preprocessor">#define CRYPTOPP_LUC_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">*/</span><a name="l00006"></a>00006 <a name="l00007"></a>00007 <span class="preprocessor">#include "pkcspad.h"</span><a name="l00008"></a>00008 <span class="preprocessor">#include "oaep.h"</span><a name="l00009"></a>00009 <span class="preprocessor">#include "<a class="code" href="integer_8h.html">integer.h</a>"</span><a name="l00010"></a>00010 <span class="preprocessor">#include "<a class="code" href="dh_8h.html">dh.h</a>"</span><a name="l00011"></a>00011 <a name="l00012"></a>00012 <span class="preprocessor">#include &lt;limits.h&gt;</span><a name="l00013"></a>00013 <a name="l00014"></a>00014 NAMESPACE_BEGIN(CryptoPP)<a name="l00015"></a>00015 <a name="l00016"></a>00016 <span class="comment">//! The LUC function.</span><a name="l00017"></a>00017 <span class="comment"></span><span class="comment">/*! This class is here for historical and pedagogical interest. It has no</span><a name="l00018"></a>00018 <span class="comment">        practical advantages over other trapdoor functions and probably shouldn't</span><a name="l00019"></a>00019 <span class="comment">        be used in production software. The discrete log based LUC schemes</span><a name="l00020"></a>00020 <span class="comment">        defined later in this .h file may be of more practical interest.</span><a name="l00021"></a>00021 <span class="comment">*/</span><a name="l00022"></a><a class="code" href="class_l_u_c_function.html">00022</a> class <a class="code" href="class_l_u_c_function.html" title="The LUC function.">LUCFunction</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="l00023"></a>00023 {<a name="l00024"></a>00024         <span class="keyword">typedef</span> <a class="code" href="class_l_u_c_function.html" title="The LUC function.">LUCFunction</a> <a class="code" href="class_l_u_c_function.html" title="The LUC function.">ThisClass</a>;<a name="l00025"></a>00025 <a name="l00026"></a>00026 <span class="keyword">public</span>:<a name="l00027"></a><a class="code" href="class_l_u_c_function.html#5d8eb9d2acd130a768326200e3c6ac40">00027</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, <span class="keyword">const</span> <a class="code" href="class_integer.html" title="multiple precision integer and basic arithmetics">Integer</a> &amp;e)<a name="l00028"></a>00028                 {m_n = n; m_e = e;}<a name="l00029"></a>00029 <a name="l00030"></a>00030         <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="l00031"></a>00031         <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="l00032"></a>00032 <a name="l00033"></a>00033         <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="l00034"></a><a class="code" href="class_l_u_c_function.html#1497f939adba34c6370c8a17f9389f68">00034</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;}<a name="l00035"></a><a class="code" href="class_l_u_c_function.html#e80bec9ec3f76dbdb248aeef19777ef9">00035</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="l00036"></a>00036 <a name="l00037"></a>00037         <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="l00038"></a>00038         <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="l00039"></a>00039         <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="l00040"></a>00040 <a name="l00041"></a>00041         <span class="comment">// non-derived interface</span><a name="l00042"></a><a class="code" href="class_l_u_c_function.html#efaa2b4edac9236ef2f2fecb0d7801f0">00042</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="l00043"></a><a class="code" href="class_l_u_c_function.html#db5485e2919c45e0e69f1a20066d156f">00043</a>         <span class="keyword">const</span> <a class="code" href="class_integer.html" title="multiple precision integer and basic arithmetics">Integer</a> &amp; GetPublicExponent()<span class="keyword"> const </span>{<span class="keywordflow">return</span> m_e;}<a name="l00044"></a>00044 <a name="l00045"></a><a class="code" href="class_l_u_c_function.html#835af704304ce8f7fca4c522a5493dfd">00045</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;}

⌨️ 快捷键说明

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