📄 sosemanuk_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++: sosemanuk.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>sosemanuk.h</h1><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="preprocessor">#ifndef CRYPTOPP_SOSEMANUK_H</span><a name="l00002"></a>00002 <span class="preprocessor"></span><span class="preprocessor">#define CRYPTOPP_SOSEMANUK_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">//! algorithm info</span><a name="l00009"></a><a class="code" href="struct_sosemanuk_info.html">00009</a> <span class="comment"></span>struct <a class="code" href="struct_sosemanuk_info.html" title="algorithm info">SosemanukInfo</a> : public <a class="code" href="class_variable_key_length.html" title="support query of variable key length, template parameters are default, min, max,...">VariableKeyLength</a><16, 1, 32, 1, <a class="code" href="class_simple_keying_interface.html" title="keying interface for crypto algorithms that take byte strings as keys">SimpleKeyingInterface</a>::UNIQUE_IV, 16><a name="l00010"></a>00010 {<a name="l00011"></a><a class="code" href="struct_sosemanuk_info.html#c8739d90cb75366ed618a04c28db1d0a">00011</a> <span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">char</span> * StaticAlgorithmName() {<span class="keywordflow">return</span> <span class="stringliteral">"Sosemanuk"</span>;}<a name="l00012"></a>00012 };<a name="l00013"></a>00013 <span class="comment"></span><a name="l00014"></a>00014 <span class="comment">//! _</span><a name="l00015"></a><a class="code" href="class_sosemanuk_policy.html">00015</a> <span class="comment"></span><span class="keyword">class </span><a class="code" href="class_sosemanuk_policy.html" title="_">SosemanukPolicy</a> : <span class="keyword">public</span> <a class="code" href="struct_additive_cipher_concrete_policy.html">AdditiveCipherConcretePolicy</a><word32, 20>, <span class="keyword">public</span> <a class="code" href="struct_sosemanuk_info.html" title="algorithm info">SosemanukInfo</a><a name="l00016"></a>00016 {<a name="l00017"></a>00017 <span class="keyword">protected</span>:<a name="l00018"></a>00018 <span class="keywordtype">void</span> <a class="code" href="class_sosemanuk_policy.html#2a34d753d4c204691a78f07496645f6b">CipherSetKey</a>(<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="l00019"></a>00019 <span class="keywordtype">void</span> <a class="code" href="class_sosemanuk_policy.html#8417e2849165e287db8f75cb1ddaea7c">OperateKeystream</a>(<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="l00020"></a>00020 <span class="keywordtype">void</span> <a class="code" href="class_sosemanuk_policy.html#53bb8603243c70cbcac7de6d6a36bf7e">CipherResynchronize</a>(byte *keystreamBuffer, <span class="keyword">const</span> byte *iv);<a name="l00021"></a><a class="code" href="class_sosemanuk_policy.html#54490172a28ac82b7c4fbe420f3239ed">00021</a> <span class="keywordtype">bool</span> <a class="code" href="class_sosemanuk_policy.html#54490172a28ac82b7c4fbe420f3239ed">IsRandomAccess</a>()<span class="keyword"> const </span>{<span class="keywordflow">return</span> <span class="keyword">false</span>;}<a name="l00022"></a>00022 <span class="preprocessor">#if CRYPTOPP_BOOL_X86 || CRYPTOPP_BOOL_X64</span><a name="l00023"></a>00023 <span class="preprocessor"></span> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="struct_additive_cipher_concrete_policy.html#5bdc1cb44b0ddc8df0fb6953aec93602">GetAlignment</a>() <span class="keyword">const</span>;<a name="l00024"></a>00024 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="struct_additive_cipher_abstract_policy.html#32bbafa12b59e77d4d8bc67e9d5a4004">GetOptimalBlockSize</a>() <span class="keyword">const</span>;<a name="l00025"></a>00025 <span class="preprocessor">#endif</span><a name="l00026"></a>00026 <span class="preprocessor"></span><a name="l00027"></a><a class="code" href="class_sosemanuk_policy.html#c0c2156a600c8843cf1117d5720e1559">00027</a> <a class="code" href="class_fixed_size_sec_block.html" title="a SecBlock with fixed size, allocated statically">FixedSizeSecBlock<word32, 25*4></a> <a class="code" href="class_sosemanuk_policy.html#c0c2156a600c8843cf1117d5720e1559">m_key</a>;<a name="l00028"></a><a class="code" href="class_sosemanuk_policy.html#996c06115c9de685f45a11789d3f3b76">00028</a> <a class="code" href="class_fixed_size_aligned_sec_block.html">FixedSizeAlignedSecBlock<word32, 12></a> <a class="code" href="class_sosemanuk_policy.html#996c06115c9de685f45a11789d3f3b76">m_state</a>;<a name="l00029"></a>00029 };<a name="l00030"></a>00030 <span class="comment"></span><a name="l00031"></a>00031 <span class="comment">//! <a href="http://www.cryptolounge.org/wiki/Sosemanuk">Sosemanuk</a></span><a name="l00032"></a><a class="code" href="struct_sosemanuk.html">00032</a> <span class="comment"></span><span class="keyword">struct </span><a class="code" href="struct_sosemanuk.html" title="Sosemanuk">Sosemanuk</a> : <span class="keyword">public</span> <a class="code" href="struct_sosemanuk_info.html" title="algorithm info">SosemanukInfo</a>, <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="l00033"></a>00033 {<a name="l00034"></a><a class="code" href="struct_sosemanuk.html#110af79da7c54356637e0ba0dcc0426e">00034</a> <span class="keyword">typedef</span> <a class="code" href="class_symmetric_cipher_final.html" title="_">SymmetricCipherFinal<ConcretePolicyHolder<SosemanukPolicy, AdditiveCipherTemplate<></a> >, <a class="code" href="struct_sosemanuk_info.html" title="algorithm info">SosemanukInfo</a>> <a class="code" href="class_symmetric_cipher.html" title="interface for one direction (encryption or decryption) of a stream cipher or cipher...">Encryption</a>;<a name="l00035"></a><a class="code" href="struct_sosemanuk.html#008eb3d13f878d6f6568bbe1d54e8823">00035</a> <span class="keyword">typedef</span> <a class="code" href="class_symmetric_cipher.html" title="interface for one direction (encryption or decryption) of a stream cipher or cipher...">Encryption</a> <a class="code" href="class_symmetric_cipher.html" title="interface for one direction (encryption or decryption) of a stream cipher or cipher...">Decryption</a>;<a name="l00036"></a>00036 };<a name="l00037"></a>00037 <a name="l00038"></a>00038 NAMESPACE_END<a name="l00039"></a>00039 <a name="l00040"></a>00040 <span class="preprocessor">#endif</span></pre></div><hr size="1"><address style="text-align: right;"><small>Generated on Fri Jun 1 11:11:25 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 + -