📄 seal_8h-source.html
字号:
<!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++: seal.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 Page</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="classes.html">Alphabetical List</a> | <a class="qindex" href="annotated.html">Compound List</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="namespacemembers.html">Namespace Members</a> | <a class="qindex" href="functions.html">Compound Members</a> | <a class="qindex" href="globals.html">File Members</a></div><h1>seal.h</h1><div class="fragment"><pre>00001 <span class="preprocessor">#ifndef CRYPTOPP_SEAL_H</span>00002 <span class="preprocessor"></span><span class="preprocessor">#define CRYPTOPP_SEAL_H</span>00003 <span class="preprocessor"></span>00004 <span class="preprocessor">#include "<a class="code" href="strciphr_8h.html">strciphr.h</a>"</span>00005 00006 NAMESPACE_BEGIN(CryptoPP)00007 00008 <span class="keyword">template</span> <<span class="keyword">class</span> B = BigEndian>00009 <span class="keyword">struct </span>SEAL_Info : <span class="keyword">public</span> <a class="code" href="class_fixed_key_length.html">FixedKeyLength</a><20, SimpleKeyingInterface::INTERNALLY_GENERATED_IV>00010 {00011 <span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">char</span> *StaticAlgorithmName() {<span class="keywordflow">return</span> B::ToEnum() == LITTLE_ENDIAN_ORDER ? <span class="stringliteral">"SEAL-3.0-LE"</span> : <span class="stringliteral">"SEAL-3.0-BE"</span>;}00012 };00013 00014 <span class="keyword">template</span> <<span class="keyword">class</span> B = BigEndian>00015 <span class="keyword">class </span>SEAL_Policy : <span class="keyword">public</span> AdditiveCipherConcretePolicy<word32, 1024>, <span class="keyword">public</span> SEAL_Info<B>00016 {00017 <span class="keyword">public</span>:00018 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> IVSize()<span class="keyword"> const </span>{<span class="keywordflow">return</span> 4;}00019 <span class="keywordtype">void</span> GetNextIV(byte *IV)<span class="keyword"> const </span>{UnalignedPutWord(BIG_ENDIAN_ORDER, IV, m_outsideCounter+1);}00020 00021 <span class="keyword">protected</span>:00022 <span class="keywordtype">void</span> CipherSetKey(<span class="keyword">const</span> <a class="code" href="class_name_value_pairs.html">NameValuePairs</a> &params, <span class="keyword">const</span> byte *key, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> length);00023 <span class="keywordtype">void</span> OperateKeystream(KeystreamOperation operation, byte *output, <span class="keyword">const</span> byte *input, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> iterationCount);00024 <span class="keywordtype">void</span> CipherResynchronize(byte *keystreamBuffer, <span class="keyword">const</span> byte *IV);00025 <span class="keywordtype">bool</span> IsRandomAccess()<span class="keyword"> const </span>{<span class="keywordflow">return</span> <span class="keyword">true</span>;}00026 <span class="keywordtype">void</span> SeekToIteration(dword iterationCount);00027 00028 <span class="keyword">private</span>:00029 FixedSizeSecBlock<word32, 512> m_T;00030 FixedSizeSecBlock<word32, 256> m_S;00031 <a class="code" href="class_sec_block.html">SecBlock<word32></a> m_R;00032 00033 word32 m_startCount, m_iterationsPerCount;00034 word32 m_outsideCounter, m_insideCounter;00035 };00036 <span class="comment"></span>00037 <span class="comment">//! <a href="http://www.weidai.com/scan-mirror/cs.html#SEAL-3.0-BE">SEAL</a></span>00038 <span class="comment"></span><span class="keyword">template</span> <<span class="keyword">class</span> B = BigEndian><a name="l00039"></a><a class="code" href="struct_s_e_a_l.html">00039</a> <span class="keyword">struct </span><a class="code" href="struct_s_e_a_l.html">SEAL</a> : <span class="keyword">public</span> SEAL_Info<B>, <span class="keyword">public</span> <a class="code" href="struct_symmetric_cipher_documentation.html">SymmetricCipherDocumentation</a>00040 {<a name="l00041"></a><a class="code" href="struct_s_e_a_l.html#_s_e_a_lw0">00041</a> <span class="keyword">typedef</span> SymmetricCipherFinalTemplate<ConcretePolicyHolder<SEAL_Policy<B>, AdditiveCipherTemplate<> >, SEAL_Info<B> > Encryption;<a name="l00042"></a><a class="code" href="struct_s_e_a_l.html#_s_e_a_lw1">00042</a> <span class="keyword">typedef</span> Encryption Decryption;00043 };00044 00045 NAMESPACE_END00046 00047 <span class="preprocessor">#endif</span></pre></div><hr size="1"><address style="align: right;"><small>Generated on Tue Jul 8 23:34:24 2003 for Crypto++ by<a href="http://www.doxygen.org/index.html"><img src="doxygen.png" alt="doxygen" align="middle" border=0 > </a>1.3.2 </small></address></body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -