📄 cryptlib_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++: cryptlib.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>cryptlib.h</h1><a href="cryptlib_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre>00001 <span class="comment">// cryptlib.h - written and placed in the public domain by Wei Dai</span><span class="comment"></span>00002 <span class="comment">/*! \file</span>00003 <span class="comment"> This file contains the declarations for the abstract base</span>00004 <span class="comment"> classes that provide a uniform interface to this library.</span>00005 <span class="comment">*/</span>00006 <span class="comment"></span>00007 <span class="comment">/*! \mainpage <a href="http://www.cryptopp.com">Crypto++</a><sup><small>TM</small></sup> Library 5.0.4 Reference Manual</span>00008 <span class="comment"><dl></span>00009 <span class="comment"><dt>Abstract Base Classes<dd></span>00010 <span class="comment"> cryptlib.h</span>00011 <span class="comment"><dt>Symmetric Ciphers<dd></span>00012 <span class="comment"> SymmetricCipherDocumentation</span>00013 <span class="comment"><dt>Hash Functions<dd></span>00014 <span class="comment"> HAVAL, MD2, MD4, MD5, PanamaHash, RIPEMD160, SHA, SHA256, SHA384, SHA512, Tiger</span>00015 <span class="comment"><dt>Non-Cryptographic Checksums<dd></span>00016 <span class="comment"> CRC32, Adler32</span>00017 <span class="comment"><dt>Message Authentication Codes<dd></span>00018 <span class="comment"> #MD5MAC, XMACC, HMAC, CBC_MAC, DMAC, PanamaMAC</span>00019 <span class="comment"><dt>Random Number Generators<dd></span>00020 <span class="comment"> NullRNG(), LC_RNG, RandomPool, BlockingRng, NonblockingRng, AutoSeededRandomPool, AutoSeededX917RNG</span>00021 <span class="comment"><dt>Public Key Cryptosystems<dd></span>00022 <span class="comment"> DLIES, ECIES, LUCES, RSAES, RabinES, LUC_IES</span>00023 <span class="comment"><dt>Public Key Signature Schemes<dd></span>00024 <span class="comment"> DSA, GDSA, ECDSA, NR, ECNR, LUCSSA, RSASSA, RabinSSR, RWSSA, ESIGN</span>00025 <span class="comment"><dt>Key Agreement<dd></span>00026 <span class="comment"> #DH, DH2, #MQV, ECDH, ECMQV, XTR_DH</span>00027 <span class="comment"><dt>Algebraic Structures<dd></span>00028 <span class="comment"> Integer, PolynomialMod2, PolynomialOver, RingOfPolynomialsOver,</span>00029 <span class="comment"> ModularArithmetic, MontgomeryRepresentation, GFP2_ONB,</span>00030 <span class="comment"> GF2NP, GF256, GF2_32, EC2N, ECP</span>00031 <span class="comment"><dt>Secret Sharing and Information Dispersal<dd></span>00032 <span class="comment"> SecretSharing, SecretRecovery, InformationDispersal, InformationRecovery</span>00033 <span class="comment"><dt>Compression<dd></span>00034 <span class="comment"> Deflator, Inflator, Gzip, Gunzip, ZlibCompressor, ZlibDecompressor</span>00035 <span class="comment"><dt>Input Source Classes<dd></span>00036 <span class="comment"> StringSource, FileSource, SocketSource, WindowsPipeSource, RandomNumberSource</span>00037 <span class="comment"><dt>Output Sink Classes<dd></span>00038 <span class="comment"> StringSinkTemplate, ArraySink, FileSink, SocketSink, WindowsPipeSink</span>00039 <span class="comment"><dt>Filter Wrappers<dd></span>00040 <span class="comment"> StreamTransformationFilter, HashFilter, HashVerificationFilter, SignerFilter, SignatureVerificationFilter</span>00041 <span class="comment"><dt>Binary to Text Encoders and Decoders<dd></span>00042 <span class="comment"> HexEncoder, HexDecoder, Base64Encoder, Base64Decoder</span>00043 <span class="comment"><dt>Wrappers for OS features<dd></span>00044 <span class="comment"> Timer, Socket, WindowsHandle, ThreadLocalStorage</span>00045 <span class="comment"><dt>FIPS 140 related<dd></span>00046 <span class="comment"> fips140.h</span>00047 <span class="comment"></dl></span>00048 <span class="comment"></span>00049 <span class="comment">In the FIPS 140-2 validated DLL version of Crypto++, only the following </span>00050 <span class="comment">security function implementation classes are available.</span>00051 <span class="comment"><dl></span>00052 <span class="comment"><dt>Block Ciphers<dd></span>00053 <span class="comment"> AES, DES_EDE2, DES_EDE3, SKIPJACK</span>00054 <span class="comment"><dt>Cipher Modes (replace template parameter BC with one of the block ciphers above)<dd></span>00055 <span class="comment"> ECB_Mode <BC>, CTR_Mode <BC>, CBC_Mode <BC>, CFB_Mode <BC>, OFB_Mode <BC></span>00056 <span class="comment"><dt>Hash Functions<dd></span>00057 <span class="comment"> SHA</span>00058 <span class="comment"><dt>Public Key Signature Schemes<dd></span>00059 <span class="comment"> RSASSA <PKCS1v15, SHA>, DSA, ECDSA <ECP, SHA>, ECDSA <EC2N, SHA></span>00060 <span class="comment"><dt>Message Authentication Codes<dd></span>00061 <span class="comment"> HMAC <SHA>, CBC_MAC <DES_EDE2>, CBC_MAC <DES_EDE3></span>00062 <span class="comment"><dt>Random Number Generators<dd></span>00063 <span class="comment"> AutoSeededX917RNG <DES_EDE3></span>00064 <span class="comment"><dt>Key Agreement<dd></span>00065 <span class="comment"> #DH</span>00066 <span class="comment"><dt>Public Key Cryptosystems<dd></span>00067 <span class="comment"> RSAES <OAEP<SHA> ></span>00068 <span class="comment"></dl></span>00069 <span class="comment"></span>00070 <span class="comment"><p>This reference manual is a work in progress. Some classes are still lacking detailed descriptions.</span>00071 <span class="comment"><p>Click <a href="CryptoPPRef.zip">here</a> to download a zip archive containing this manual.</span>00072 <span class="comment"><p>Thanks to Ryan Phillips for providing the Doxygen configuration file</span>00073 <span class="comment">and getting me started with this manual.</span>00074 <span class="comment">*/</span>00075 00076 <span class="preprocessor">#ifndef CRYPTOPP_CRYPTLIB_H</span>00077 <span class="preprocessor"></span><span class="preprocessor">#define CRYPTOPP_CRYPTLIB_H</span>00078 <span class="preprocessor"></span>00079 <span class="preprocessor">#include "config.h"</span>00080 <span class="preprocessor">#include "stdcpp.h"</span>00081 00082 NAMESPACE_BEGIN(CryptoPP)00083 00084 <span class="comment">// forward declarations</span>00085 <span class="keyword">class </span><a class="code" href="class_integer.html">Integer</a>;00086 <span class="comment"></span>00087 <span class="comment">//! used to specify a direction for a cipher to operate in (encrypt or decrypt)</span><a name="l00088"></a><a class="code" href="cryptlib_8h.html#a11">00088</a> <span class="comment"></span><span class="keyword">enum</span> <a class="code" href="cryptlib_8h.html#a11">CipherDir</a> {ENCRYPTION, DECRYPTION};00089 <span class="comment"></span>00090 <span class="comment">//! used to represent infinite time</span><a name="l00091"></a><a class="code" href="cryptlib_8h.html#a0">00091</a> <span class="comment"></span><span class="keyword">const</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> <a class="code" href="cryptlib_8h.html#a0">INFINITE_TIME</a> = ULONG_MAX;00092 00093 <span class="comment">// VC60 workaround: using enums as template parameters causes problems</span>00094 <span class="keyword">template</span> <<span class="keyword">typename</span> ENUM_TYPE, <span class="keywordtype">int</span> VALUE>00095 <span class="keyword">struct </span>EnumToType00096 {00097 <span class="keyword">static</span> ENUM_TYPE ToEnum() {<span class="keywordflow">return</span> (ENUM_TYPE)VALUE;}00098 };00099 00100 <span class="keyword">enum</span> ByteOrder {LITTLE_ENDIAN_ORDER = 0, BIG_ENDIAN_ORDER = 1};00101 <span class="keyword">typedef</span> EnumToType<ByteOrder, LITTLE_ENDIAN_ORDER> LittleEndian;00102 <span class="keyword">typedef</span> EnumToType<ByteOrder, BIG_ENDIAN_ORDER> BigEndian;00103 <span class="comment"></span>00104 <span class="comment">//! base class for all exceptions thrown by Crypto++</span><a name="l00105"></a><a class="code" href="class_exception.html">00105</a> <span class="comment"></span><span class="keyword">class </span>CRYPTOPP_DLL Exception : <span class="keyword">public</span> std::exception00106 {00107 <span class="keyword">public</span>:<span class="comment"></span>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -