📄 seckey_8h-source.html
字号:
<a name="l00140"></a>00140 };<a name="l00141"></a>00141 <a name="l00142"></a>00142 <span class="keyword">template</span> <<span class="keyword">class</span> INFO, <span class="keyword">class</span> BASE = BlockCipher><a name="l00143"></a><a class="code" href="class_block_cipher_impl.html">00143</a> <span class="keyword">class </span>CRYPTOPP_NO_VTABLE BlockCipherImpl : <span class="keyword">public</span> <a class="code" href="class_algorithm_impl.html" title="_">AlgorithmImpl</a><SimpleKeyingInterfaceImpl<TwoBases<BASE, INFO> > ><a name="l00144"></a>00144 {<a name="l00145"></a>00145 <span class="keyword">public</span>:<a name="l00146"></a><a class="code" href="class_block_cipher_impl.html#6a1e49d528441fd1f56faf36f06c2984">00146</a> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> BlockSize()<span class="keyword"> const </span>{<span class="keywordflow">return</span> this->BLOCKSIZE;}<a name="l00147"></a>00147 };<a name="l00148"></a>00148 <span class="comment"></span><a name="l00149"></a>00149 <span class="comment">//! _</span><a name="l00150"></a>00150 <span class="comment"></span><span class="keyword">template</span> <CipherDir DIR, <span class="keyword">class</span> BASE><a name="l00151"></a><a class="code" href="class_block_cipher_final.html">00151</a> <span class="keyword">class </span><a class="code" href="class_block_cipher_final.html" title="_">BlockCipherFinal</a> : <span class="keyword">public</span> <a class="code" href="class_clonable_impl.html" title="_">ClonableImpl</a><BlockCipherFinal<DIR, BASE>, BASE><a name="l00152"></a>00152 {<a name="l00153"></a>00153 <span class="keyword">public</span>:<a name="l00154"></a><a class="code" href="class_block_cipher_final.html#afec948b5a888b28555be33a39934775">00154</a> <a class="code" href="class_block_cipher_final.html#afec948b5a888b28555be33a39934775">BlockCipherFinal</a>() {}<a name="l00155"></a><a class="code" href="class_block_cipher_final.html#c55f08ebf73f9ce14e3d2c8c3912a6c2">00155</a> <a class="code" href="class_block_cipher_final.html#afec948b5a888b28555be33a39934775">BlockCipherFinal</a>(<span class="keyword">const</span> byte *key)<a name="l00156"></a>00156 {this->SetKey(key, this->DEFAULT_KEYLENGTH);}<a name="l00157"></a><a class="code" href="class_block_cipher_final.html#e6c97b4e4bcf45216a1e79140ad6bc4b">00157</a> <a class="code" href="class_block_cipher_final.html#afec948b5a888b28555be33a39934775">BlockCipherFinal</a>(<span class="keyword">const</span> byte *key, <span class="keywordtype">size_t</span> length)<a name="l00158"></a>00158 {this->SetKey(key, length);}<a name="l00159"></a><a class="code" href="class_block_cipher_final.html#d2de9298c032674fa6cd6bf94860edef">00159</a> <a class="code" href="class_block_cipher_final.html#afec948b5a888b28555be33a39934775">BlockCipherFinal</a>(<span class="keyword">const</span> byte *key, <span class="keywordtype">size_t</span> length, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> rounds)<a name="l00160"></a>00160 {this->SetKeyWithRounds(key, length, rounds);}<a name="l00161"></a>00161 <a name="l00162"></a><a class="code" href="class_block_cipher_final.html#668d8a5fd887cb903dd08fc7e47b2142">00162</a> <span class="keywordtype">bool</span> <a class="code" href="class_block_cipher_final.html#668d8a5fd887cb903dd08fc7e47b2142">IsForwardTransformation</a>()<span class="keyword"> const </span>{<span class="keywordflow">return</span> DIR == <a class="code" href="cryptlib_8h.html#353ccabf5ddc119a6a33e92f7b9961c7244e5e74f856cdd5aafc1005877a2f61">ENCRYPTION</a>;}<a name="l00163"></a>00163 };<a name="l00164"></a>00164 <span class="comment"></span><a name="l00165"></a>00165 <span class="comment">//! _</span><a name="l00166"></a>00166 <span class="comment"></span><span class="keyword">template</span> <<span class="keyword">class</span> BASE, <span class="keyword">class</span> INFO = BASE><a name="l00167"></a><a class="code" href="class_message_authentication_code_impl.html">00167</a> <span class="keyword">class </span><a class="code" href="class_message_authentication_code_impl.html" title="_">MessageAuthenticationCodeImpl</a> : <span class="keyword">public</span> <a class="code" href="class_algorithm_impl.html" title="_">AlgorithmImpl</a><SimpleKeyingInterfaceImpl<BASE, INFO>, INFO><a name="l00168"></a>00168 {<a name="l00169"></a>00169 };<a name="l00170"></a>00170 <span class="comment"></span><a name="l00171"></a>00171 <span class="comment">//! _</span><a name="l00172"></a>00172 <span class="comment"></span><span class="keyword">template</span> <<span class="keyword">class</span> BASE><a name="l00173"></a><a class="code" href="class_message_authentication_code_final.html">00173</a> <span class="keyword">class </span><a class="code" href="class_message_authentication_code_final.html" title="_">MessageAuthenticationCodeFinal</a> : <span class="keyword">public</span> <a class="code" href="class_clonable_impl.html" title="_">ClonableImpl</a><MessageAuthenticationCodeFinal<BASE>, MessageAuthenticationCodeImpl<BASE> ><a name="l00174"></a>00174 {<a name="l00175"></a>00175 <span class="keyword">public</span>:<a name="l00176"></a><a class="code" href="class_message_authentication_code_final.html#ef7b8842df0ebaae4fdfd9ccd9585f2a">00176</a> <a class="code" href="class_message_authentication_code_final.html#ef7b8842df0ebaae4fdfd9ccd9585f2a">MessageAuthenticationCodeFinal</a>() {}<a name="l00177"></a><a class="code" href="class_message_authentication_code_final.html#41d2c1ac0470912e22d99ba8f397781f">00177</a> <a class="code" href="class_message_authentication_code_final.html#ef7b8842df0ebaae4fdfd9ccd9585f2a">MessageAuthenticationCodeFinal</a>(<span class="keyword">const</span> byte *key)<a name="l00178"></a>00178 {this->SetKey(key, this->DEFAULT_KEYLENGTH);}<a name="l00179"></a><a class="code" href="class_message_authentication_code_final.html#39ffff70fea0a92cbe8943a1f11cdb78">00179</a> <a class="code" href="class_message_authentication_code_final.html#ef7b8842df0ebaae4fdfd9ccd9585f2a">MessageAuthenticationCodeFinal</a>(<span class="keyword">const</span> byte *key, <span class="keywordtype">size_t</span> length)<a name="l00180"></a>00180 {this->SetKey(key, length);}<a name="l00181"></a>00181 };<a name="l00182"></a>00182 <a name="l00183"></a>00183 <span class="comment">// ************** documentation ***************</span><a name="l00184"></a>00184 <span class="comment"></span><a name="l00185"></a>00185 <span class="comment">//! These objects usually should not be used directly. See CipherModeDocumentation instead.</span><a name="l00186"></a>00186 <span class="comment"></span><span class="comment">/*! Each class derived from this one defines two types, Encryption and Decryption, </span><a name="l00187"></a>00187 <span class="comment"> both of which implement the BlockCipher interface. */</span><a name="l00188"></a><a class="code" href="struct_block_cipher_documentation.html">00188</a> <span class="keyword">struct </span><a class="code" href="struct_block_cipher_documentation.html" title="These objects usually should not be used directly. See CipherModeDocumentation instead...">BlockCipherDocumentation</a><a name="l00189"></a>00189 {<span class="comment"></span><a name="l00190"></a>00190 <span class="comment"> //! implements the BlockCipher interface</span><a name="l00191"></a><a class="code" href="struct_block_cipher_documentation.html#921359d125b6031a308179d32948b782">00191</a> <span class="comment"></span> <span class="keyword">typedef</span> <a class="code" href="class_block_cipher.html" title="interface for one direction (encryption or decryption) of a block cipher">BlockCipher</a> <a class="code" href="class_block_cipher.html" title="interface for one direction (encryption or decryption) of a block cipher">Encryption</a>;<span class="comment"></span><a name="l00192"></a>00192 <span class="comment"> //! implements the BlockCipher interface</span><a name="l00193"></a><a class="code" href="struct_block_cipher_documentation.html#71771ce405edecc9ff8a4788274a9147">00193</a> <span class="comment"></span> <span class="keyword">typedef</span> <a class="code" href="class_block_cipher.html" title="interface for one direction (encryption or decryption) of a block cipher">BlockCipher</a> <a class="code" href="class_block_cipher.html" title="interface for one direction (encryption or decryption) of a block cipher">Decryption</a>;<a name="l00194"></a>00194 };<a name="l00195"></a>00195 <span class="comment"></span><a name="l00196"></a>00196 <span class="comment">/*! \brief Each class derived from this one defines two types, Encryption and Decryption, </span><a name="l00197"></a>00197 <span class="comment"> both of which implement the SymmetricCipher interface. Two types of classes derive</span><a name="l00198"></a>00198 <span class="comment"> from this class: stream ciphers and block cipher modes. Stream ciphers can be used</span><a name="l00199"></a>00199 <span class="comment"> alone, cipher mode classes need to be used with a block cipher. See CipherModeDocumentation</span><a name="l00200"></a>00200 <span class="comment"> for more for information about using cipher modes and block ciphers. */</span><a name="l00201"></a><a class="code" href="struct_symmetric_cipher_documentation.html">00201</a> <span class="keyword">struct </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="l00202"></a>00202 {<span class="comment"></span><a name="l00203"></a>00203 <span class="comment"> //! implements the SymmetricCipher interface</span><a name="l00204"></a><a class="code" href="struct_symmetric_cipher_documentation.html#44854216f0ebd272eddfd7f3877ecb34">00204</a> <span class="comment"></span> <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...">SymmetricCipher</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>;<span class="comment"></span><a name="l00205"></a>00205 <span class="comment"> //! implements the SymmetricCipher interface</span><a name="l00206"></a><a class="code" href="struct_symmetric_cipher_documentation.html#0d5bbe79fd8fb71c0f857bb97b0d1f2f">00206</a> <span class="comment"></span> <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...">SymmetricCipher</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="l00207"></a>00207 };<a name="l00208"></a>00208 <a name="l00209"></a>00209 NAMESPACE_END<a name="l00210"></a>00210 <a name="l00211"></a>00211 <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 + -