Sophie

Sophie

distrib > Mandriva > 10.2 > i586 > media > contrib > by-pkgid > 7457b841ac8136d3a1a9d3d960c5252e > files > 3

libcryptopp-doc-5.2.1-2mdk.i586.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
<title>Crypto++: 3way.h Source File</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.3.7 -->
<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class&nbsp;Hierarchy</a> | <a class="qindex" href="classes.html">Alphabetical&nbsp;List</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="namespacemembers.html">Namespace&nbsp;Members</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a></div>
<h1>3way.h</h1><a href="3way_8h.html">Go to the documentation of this file.</a><pre class="fragment"><div>00001 <span class="preprocessor">#ifndef CRYPTOPP_THREEWAY_H</span>
00002 <span class="preprocessor"></span><span class="preprocessor">#define CRYPTOPP_THREEWAY_H</span>
00003 <span class="preprocessor"></span><span class="comment"></span>
00004 <span class="comment">/** \file</span>
00005 <span class="comment">*/</span>
00006 
00007 <span class="preprocessor">#include "seckey.h"</span>
00008 <span class="preprocessor">#include "secblock.h"</span>
00009 
00010 NAMESPACE_BEGIN(CryptoPP)
00011 
00012 <span class="comment">//! _</span>
<a name="l00013"></a><a class="code" href="struct_three_way___info.html">00013</a> <span class="comment"></span>struct <a class="code" href="struct_three_way___info.html">ThreeWay_Info</a> : public <a class="code" href="class_fixed_block_size.html">FixedBlockSize</a>&lt;12&gt;, public <a class="code" href="class_fixed_key_length.html">FixedKeyLength</a>&lt;12&gt;, public <a class="code" href="class_variable_rounds.html">VariableRounds</a>&lt;11&gt;
00014 {
00015         <span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">char</span> *StaticAlgorithmName() {<span class="keywordflow">return</span> <span class="stringliteral">"3-Way"</span>;}
00016 };
00017 <span class="comment"></span>
00018 <span class="comment">/// &lt;a href="http://www.weidai.com/scan-mirror/cs.html#3-Way"&gt;3-Way&lt;/a&gt;</span>
<a name="l00019"></a><a class="code" href="class_three_way.html">00019</a> <span class="comment"></span><span class="keyword">class </span><a class="code" href="class_three_way.html">ThreeWay</a> : <span class="keyword">public</span> <a class="code" href="struct_three_way___info.html">ThreeWay_Info</a>, <span class="keyword">public</span> <a class="code" href="struct_block_cipher_documentation.html">BlockCipherDocumentation</a>
00020 {
00021         <span class="keyword">class </span>CRYPTOPP_NO_VTABLE Base : <span class="keyword">public</span> BlockCipherImpl&lt;ThreeWay_Info&gt;
00022         {
00023         <span class="keyword">public</span>:
00024                 <span class="keywordtype">void</span> UncheckedSetKey(<a class="code" href="cryptlib_8h.html#a11">CipherDir</a> direction, <span class="keyword">const</span> byte *key, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> length, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> rounds);
00025 
00026         <span class="keyword">protected</span>:
00027                 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> m_rounds;
00028                 FixedSizeSecBlock&lt;word32, 3&gt; m_k;
00029         };
00030 
00031         <span class="keyword">class </span>CRYPTOPP_NO_VTABLE Enc : <span class="keyword">public</span> Base
00032         {
00033         <span class="keyword">public</span>:
00034                 <span class="keywordtype">void</span> ProcessAndXorBlock(<span class="keyword">const</span> byte *inBlock, <span class="keyword">const</span> byte *xorBlock, byte *outBlock) <span class="keyword">const</span>;
00035         };
00036 
00037         <span class="keyword">class </span>CRYPTOPP_NO_VTABLE Dec : <span class="keyword">public</span> Base
00038         {
00039         <span class="keyword">public</span>:
00040                 <span class="keywordtype">void</span> ProcessAndXorBlock(<span class="keyword">const</span> byte *inBlock, <span class="keyword">const</span> byte *xorBlock, byte *outBlock) <span class="keyword">const</span>;
00041         };
00042 
00043 <span class="keyword">public</span>:
<a name="l00044"></a><a class="code" href="class_three_way.html#_three_wayw0">00044</a>         <span class="keyword">typedef</span> <a class="code" href="class_block_cipher_final.html">BlockCipherFinal&lt;ENCRYPTION, Enc&gt;</a> <a class="code" href="class_block_cipher_final.html">Encryption</a>;
<a name="l00045"></a><a class="code" href="class_three_way.html#_three_wayw1">00045</a>         <span class="keyword">typedef</span> <a class="code" href="class_block_cipher_final.html">BlockCipherFinal&lt;DECRYPTION, Dec&gt;</a> <a class="code" href="class_block_cipher_final.html">Decryption</a>;
00046 };
00047 
00048 <span class="keyword">typedef</span> <a class="code" href="class_block_cipher_final.html">ThreeWay::Encryption</a> <a class="code" href="class_block_cipher_final.html">ThreeWayEncryption</a>;
00049 <span class="keyword">typedef</span> <a class="code" href="class_block_cipher_final.html">ThreeWay::Decryption</a> <a class="code" href="class_block_cipher_final.html">ThreeWayDecryption</a>;
00050 
00051 NAMESPACE_END
00052 
00053 <span class="preprocessor">#endif</span>
</div></pre><hr size="1"><address style="align: right;"><small>Generated on Sun Nov 7 08:23:56 2004 for Crypto++ by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.7 </small></address>
</body>
</html>