📄 seal_8h-source.html
字号:
<!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++: seal.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 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 List</span></a></li> <li><a href="globals.html"><span>File Members</span></a></li> </ul></div><h1>seal.h</h1><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="preprocessor">#ifndef CRYPTOPP_SEAL_H</span><a name="l00002"></a>00002 <span class="preprocessor"></span><span class="preprocessor">#define CRYPTOPP_SEAL_H</span><a name="l00003"></a>00003 <span class="preprocessor"></span><a name="l00004"></a>00004 <span class="preprocessor">#include "<a class="code" href="strciphr_8h.html">strciphr.h</a>"</span><a name="l00005"></a>00005 <a name="l00006"></a>00006 NAMESPACE_BEGIN(CryptoPP)<a name="l00007"></a>00007 <a name="l00008"></a>00008 <span class="comment">//! _</span><a name="l00009"></a>00009 <span class="comment"></span>template <class B = <a class="code" href="struct_enum_to_type.html">BigEndian</a>><a name="l00010"></a><a class="code" href="struct_s_e_a_l___info.html">00010</a> struct <a class="code" href="struct_s_e_a_l___info.html" title="_">SEAL_Info</a> : public <a class="code" href="class_fixed_key_length.html" title="to be inherited by keyed algorithms with fixed key length">FixedKeyLength</a><20, <a class="code" href="class_simple_keying_interface.html" title="keying interface for crypto algorithms that take byte strings as keys">SimpleKeyingInterface</a>::INTERNALLY_GENERATED_IV, 4><a name="l00011"></a>00011 {<a name="l00012"></a><a class="code" href="struct_s_e_a_l___info.html#c48512f108e2114864aa9e806fbd711d">00012</a> <span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">char</span> *StaticAlgorithmName() {<span class="keywordflow">return</span> B::ToEnum() == <a class="code" href="cryptlib_8h.html#aeb92d42f5a6e27b8ba19f18d69d142bccd5b3585bd07d6bdae383aa8271b9d2">LITTLE_ENDIAN_ORDER</a> ? <span class="stringliteral">"SEAL-3.0-LE"</span> : <span class="stringliteral">"SEAL-3.0-BE"</span>;}<a name="l00013"></a>00013 };<a name="l00014"></a>00014 <a name="l00015"></a>00015 <span class="keyword">template</span> <<span class="keyword">class</span> B = BigEndian><a name="l00016"></a><a class="code" href="class_s_e_a_l___policy.html">00016</a> <span class="keyword">class </span>CRYPTOPP_NO_VTABLE <a class="code" href="class_s_e_a_l___policy.html">SEAL_Policy</a> : <span class="keyword">public</span> <a class="code" href="struct_additive_cipher_concrete_policy.html">AdditiveCipherConcretePolicy</a><word32, 256>, <span class="keyword">public</span> <a class="code" href="struct_s_e_a_l___info.html" title="_">SEAL_Info</a><B><a name="l00017"></a>00017 {<a name="l00018"></a>00018 <span class="keyword">protected</span>:<a name="l00019"></a>00019 <span class="keywordtype">void</span> CipherSetKey(<span class="keyword">const</span> <a class="code" href="class_name_value_pairs.html" title="interface for retrieving values given their names">NameValuePairs</a> &params, <span class="keyword">const</span> byte *key, <span class="keywordtype">size_t</span> length);<a name="l00020"></a>00020 <span class="keywordtype">void</span> OperateKeystream(<a class="code" href="strciphr_8h.html#b4a226527d2bd01ff19bfa14d0974227">KeystreamOperation</a> operation, byte *output, <span class="keyword">const</span> byte *input, <span class="keywordtype">size_t</span> iterationCount);<a name="l00021"></a>00021 <span class="keywordtype">void</span> CipherResynchronize(byte *keystreamBuffer, <span class="keyword">const</span> byte *IV);<a name="l00022"></a><a class="code" href="class_s_e_a_l___policy.html#e0d5aff9021b3c7b1a1039d053607bf4">00022</a> <span class="keywordtype">bool</span> IsRandomAccess()<span class="keyword"> const </span>{<span class="keywordflow">return</span> <span class="keyword">true</span>;}<a name="l00023"></a>00023 <span class="keywordtype">void</span> SeekToIteration(lword iterationCount);<a name="l00024"></a>00024 <a name="l00025"></a>00025 <span class="keyword">private</span>:<a name="l00026"></a>00026 <a class="code" href="class_fixed_size_sec_block.html" title="a SecBlock with fixed size, allocated statically">FixedSizeSecBlock<word32, 512></a> m_T;<a name="l00027"></a>00027 <a class="code" href="class_fixed_size_sec_block.html" title="a SecBlock with fixed size, allocated statically">FixedSizeSecBlock<word32, 256></a> m_S;<a name="l00028"></a>00028 <a class="code" href="class_sec_block.html" title="a block of memory allocated using A">SecBlock<word32></a> m_R;<a name="l00029"></a>00029 <a name="l00030"></a>00030 word32 m_startCount, m_iterationsPerCount;<a name="l00031"></a>00031 word32 m_outsideCounter, m_insideCounter;<a name="l00032"></a>00032 };<a name="l00033"></a>00033 <span class="comment"></span><a name="l00034"></a>00034 <span class="comment">//! <a href="http://www.weidai.com/scan-mirror/cs.html#SEAL-3.0-BE">SEAL</a></span><a name="l00035"></a>00035 <span class="comment"></span><span class="keyword">template</span> <<span class="keyword">class</span> B = BigEndian><a name="l00036"></a><a class="code" href="struct_s_e_a_l.html">00036</a> <span class="keyword">struct </span><a class="code" href="struct_s_e_a_l.html" title="SEAL">SEAL</a> : <span class="keyword">public</span> <a class="code" href="struct_s_e_a_l___info.html" title="_">SEAL_Info</a><B>, <span class="keyword">public</span> <a class="code" href="struct_symmetric_cipher_documentation.html" title="Each class derived from this one defines two types, Encryption and Decryption, both...">SymmetricCipherDocumentation</a><a name="l00037"></a>00037 {<a name="l00038"></a><a class="code" href="struct_s_e_a_l.html#7b88cd3bc95ea6e66a3dfb2a25c5f439">00038</a> <span class="keyword">typedef</span> <a class="code" href="class_symmetric_cipher_final.html" title="_">SymmetricCipherFinal<ConcretePolicyHolder<SEAL_Policy<B></a>, <a class="code" href="class_additive_cipher_template.html">AdditiveCipherTemplate<></a> >, <a class="code" href="struct_s_e_a_l___info.html" title="_">SEAL_Info<B></a> > <a class="code" href="class_symmetric_cipher_final.html" title="_">Encryption</a>;<a name="l00039"></a><a class="code" href="struct_s_e_a_l.html#f222cc5ad7af91b0f3ea2e614d5ff449">00039</a> <span class="keyword">typedef</span> <a class="code" href="class_symmetric_cipher_final.html" title="_">Encryption</a> <a class="code" href="class_symmetric_cipher_final.html" title="_">Decryption</a>;<a name="l00040"></a>00040 };<a name="l00041"></a>00041 <a name="l00042"></a>00042 NAMESPACE_END<a name="l00043"></a>00043 <a name="l00044"></a>00044 <span class="preprocessor">#endif</span></pre></div><hr size="1"><address style="text-align: right;"><small>Generated on Fri Jun 1 11:11:24 2007 for Crypto++ by <a href="http://www.doxygen.org/index.html"><img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.2 </small></address></body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -