📄 blowfish_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++: blowfish.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>blowfish.h</h1><a href="blowfish_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre>00001 <span class="preprocessor">#ifndef CRYPTOPP_BLOWFISH_H</span>00002 <span class="preprocessor"></span><span class="preprocessor">#define CRYPTOPP_BLOWFISH_H</span>00003 <span class="preprocessor"></span><span class="comment"></span>00004 <span class="comment">/** \file */</span>00005 00006 <span class="preprocessor">#include "seckey.h"</span>00007 <span class="preprocessor">#include "secblock.h"</span>00008 00009 NAMESPACE_BEGIN(CryptoPP)00010 00011 <span class="keyword">struct </span>Blowfish_Info : <span class="keyword">public</span> <a class="code" href="class_fixed_block_size.html">FixedBlockSize</a><8>, <span class="keyword">public</span> <a class="code" href="class_variable_key_length.html">VariableKeyLength</a><16, 1, 56>, <span class="keyword">public</span> <a class="code" href="class_fixed_rounds.html">FixedRounds</a><16>00012 {00013 <span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">char</span> *StaticAlgorithmName() {<span class="keywordflow">return</span> <span class="stringliteral">"Blowfish"</span>;}00014 };00015 <span class="comment"></span>00016 <span class="comment">//! <a href="http://www.weidai.com/scan-mirror/cs.html#Blowfish">Blowfish</a></span><a name="l00017"></a><a class="code" href="class_blowfish.html">00017</a> <span class="comment"></span><span class="keyword">class </span><a class="code" href="class_blowfish.html">Blowfish</a> : <span class="keyword">public</span> Blowfish_Info, <span class="keyword">public</span> <a class="code" href="struct_block_cipher_documentation.html">BlockCipherDocumentation</a>00018 {00019 <span class="keyword">class </span>Base : <span class="keyword">public</span> BlockCipherBaseTemplate<Blowfish_Info>00020 {00021 <span class="keyword">public</span>:00022 <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>;00023 <span class="keywordtype">void</span> UncheckedSetKey(<a class="code" href="cryptlib_8h.html#a11">CipherDir</a> direction, <span class="keyword">const</span> byte *key_string, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> keylength);00024 00025 <span class="keyword">private</span>:00026 <span class="keywordtype">void</span> crypt_block(<span class="keyword">const</span> word32 in[2], word32 out[2]) <span class="keyword">const</span>;00027 00028 <span class="keyword">static</span> <span class="keyword">const</span> word32 p_init[ROUNDS+2];00029 <span class="keyword">static</span> <span class="keyword">const</span> word32 s_init[4*256];00030 00031 FixedSizeSecBlock<word32, ROUNDS+2> pbox;00032 FixedSizeSecBlock<word32, 4*256> sbox;00033 };00034 00035 <span class="keyword">public</span>:<a name="l00036"></a><a class="code" href="class_blowfish.html#_blowfishw0">00036</a> <span class="keyword">typedef</span> <a class="code" href="class_block_cipher_template.html">BlockCipherTemplate<ENCRYPTION, Base></a> <a class="code" href="class_block_cipher_template.html">Encryption</a>;<a name="l00037"></a><a class="code" href="class_blowfish.html#_blowfishw1">00037</a> <span class="keyword">typedef</span> <a class="code" href="class_block_cipher_template.html">BlockCipherTemplate<DECRYPTION, Base></a> <a class="code" href="class_block_cipher_template.html">Decryption</a>;00038 };00039 00040 <span class="keyword">typedef</span> <a class="code" href="class_block_cipher_template.html">Blowfish::Encryption</a> <a class="code" href="class_block_cipher_template.html">BlowfishEncryption</a>;00041 <span class="keyword">typedef</span> <a class="code" href="class_block_cipher_template.html">Blowfish::Decryption</a> <a class="code" href="class_block_cipher_template.html">BlowfishDecryption</a>;00042 00043 NAMESPACE_END00044 00045 <span class="preprocessor">#endif</span></pre></div><hr size="1"><address style="align: right;"><small>Generated on Tue Jul 8 23:34:09 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 + -