⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 cryptlib_8h-source.html

📁 Crypto++是一个非常强大的密码学库,主要是功能全
💻 HTML
📖 第 1 页 / 共 5 页
字号:
<!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&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">Compound&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">Compound&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;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 &lt;a href="http://www.cryptopp.com"&gt;Crypto++&lt;/a&gt;&lt;sup&gt;&lt;small&gt;TM&lt;/small&gt;&lt;/sup&gt; Library 5.0.4 Reference Manual</span>00008 <span class="comment">&lt;dl&gt;</span>00009 <span class="comment">&lt;dt&gt;Abstract Base Classes&lt;dd&gt;</span>00010 <span class="comment">        cryptlib.h</span>00011 <span class="comment">&lt;dt&gt;Symmetric Ciphers&lt;dd&gt;</span>00012 <span class="comment">        SymmetricCipherDocumentation</span>00013 <span class="comment">&lt;dt&gt;Hash Functions&lt;dd&gt;</span>00014 <span class="comment">        HAVAL, MD2, MD4, MD5, PanamaHash, RIPEMD160, SHA, SHA256, SHA384, SHA512, Tiger</span>00015 <span class="comment">&lt;dt&gt;Non-Cryptographic Checksums&lt;dd&gt;</span>00016 <span class="comment">        CRC32, Adler32</span>00017 <span class="comment">&lt;dt&gt;Message Authentication Codes&lt;dd&gt;</span>00018 <span class="comment">        #MD5MAC, XMACC, HMAC, CBC_MAC, DMAC, PanamaMAC</span>00019 <span class="comment">&lt;dt&gt;Random Number Generators&lt;dd&gt;</span>00020 <span class="comment">        NullRNG(), LC_RNG, RandomPool, BlockingRng, NonblockingRng, AutoSeededRandomPool, AutoSeededX917RNG</span>00021 <span class="comment">&lt;dt&gt;Public Key Cryptosystems&lt;dd&gt;</span>00022 <span class="comment">        DLIES, ECIES, LUCES, RSAES, RabinES, LUC_IES</span>00023 <span class="comment">&lt;dt&gt;Public Key Signature Schemes&lt;dd&gt;</span>00024 <span class="comment">        DSA, GDSA, ECDSA, NR, ECNR, LUCSSA, RSASSA, RabinSSR, RWSSA, ESIGN</span>00025 <span class="comment">&lt;dt&gt;Key Agreement&lt;dd&gt;</span>00026 <span class="comment">        #DH, DH2, #MQV, ECDH, ECMQV, XTR_DH</span>00027 <span class="comment">&lt;dt&gt;Algebraic Structures&lt;dd&gt;</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">&lt;dt&gt;Secret Sharing and Information Dispersal&lt;dd&gt;</span>00032 <span class="comment">        SecretSharing, SecretRecovery, InformationDispersal, InformationRecovery</span>00033 <span class="comment">&lt;dt&gt;Compression&lt;dd&gt;</span>00034 <span class="comment">        Deflator, Inflator, Gzip, Gunzip, ZlibCompressor, ZlibDecompressor</span>00035 <span class="comment">&lt;dt&gt;Input Source Classes&lt;dd&gt;</span>00036 <span class="comment">        StringSource, FileSource, SocketSource, WindowsPipeSource, RandomNumberSource</span>00037 <span class="comment">&lt;dt&gt;Output Sink Classes&lt;dd&gt;</span>00038 <span class="comment">        StringSinkTemplate, ArraySink, FileSink, SocketSink, WindowsPipeSink</span>00039 <span class="comment">&lt;dt&gt;Filter Wrappers&lt;dd&gt;</span>00040 <span class="comment">        StreamTransformationFilter, HashFilter, HashVerificationFilter, SignerFilter, SignatureVerificationFilter</span>00041 <span class="comment">&lt;dt&gt;Binary to Text Encoders and Decoders&lt;dd&gt;</span>00042 <span class="comment">        HexEncoder, HexDecoder, Base64Encoder, Base64Decoder</span>00043 <span class="comment">&lt;dt&gt;Wrappers for OS features&lt;dd&gt;</span>00044 <span class="comment">        Timer, Socket, WindowsHandle, ThreadLocalStorage</span>00045 <span class="comment">&lt;dt&gt;FIPS 140 related&lt;dd&gt;</span>00046 <span class="comment">        fips140.h</span>00047 <span class="comment">&lt;/dl&gt;</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">&lt;dl&gt;</span>00052 <span class="comment">&lt;dt&gt;Block Ciphers&lt;dd&gt;</span>00053 <span class="comment">        AES, DES_EDE2, DES_EDE3, SKIPJACK</span>00054 <span class="comment">&lt;dt&gt;Cipher Modes (replace template parameter BC with one of the block ciphers above)&lt;dd&gt;</span>00055 <span class="comment">        ECB_Mode &lt;BC&gt;, CTR_Mode &lt;BC&gt;, CBC_Mode &lt;BC&gt;, CFB_Mode &lt;BC&gt;, OFB_Mode &lt;BC&gt;</span>00056 <span class="comment">&lt;dt&gt;Hash Functions&lt;dd&gt;</span>00057 <span class="comment">        SHA</span>00058 <span class="comment">&lt;dt&gt;Public Key Signature Schemes&lt;dd&gt;</span>00059 <span class="comment">        RSASSA &lt;PKCS1v15, SHA&gt;, DSA, ECDSA &lt;ECP, SHA&gt;, ECDSA &lt;EC2N, SHA&gt;</span>00060 <span class="comment">&lt;dt&gt;Message Authentication Codes&lt;dd&gt;</span>00061 <span class="comment">        HMAC &lt;SHA&gt;, CBC_MAC &lt;DES_EDE2&gt;, CBC_MAC &lt;DES_EDE3&gt;</span>00062 <span class="comment">&lt;dt&gt;Random Number Generators&lt;dd&gt;</span>00063 <span class="comment">        AutoSeededX917RNG &lt;DES_EDE3&gt;</span>00064 <span class="comment">&lt;dt&gt;Key Agreement&lt;dd&gt;</span>00065 <span class="comment">        #DH</span>00066 <span class="comment">&lt;dt&gt;Public Key Cryptosystems&lt;dd&gt;</span>00067 <span class="comment">        RSAES &lt;OAEP&lt;SHA&gt; &gt;</span>00068 <span class="comment">&lt;/dl&gt;</span>00069 <span class="comment"></span>00070 <span class="comment">&lt;p&gt;This reference manual is a work in progress. Some classes are still lacking detailed descriptions.</span>00071 <span class="comment">&lt;p&gt;Click &lt;a href="CryptoPPRef.zip"&gt;here&lt;/a&gt; to download a zip archive containing this manual.</span>00072 <span class="comment">&lt;p&gt;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> &lt;<span class="keyword">typename</span> ENUM_TYPE, <span class="keywordtype">int</span> VALUE&gt;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&lt;ByteOrder, LITTLE_ENDIAN_ORDER&gt; LittleEndian;00102 <span class="keyword">typedef</span> EnumToType&lt;ByteOrder, BIG_ENDIAN_ORDER&gt; 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 + -