📄 config_8h-source.html
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8"><title>Crypto++: config.h Source File</title><link href="doxygen.css" rel="stylesheet" type="text/css"><link href="tabs.css" rel="stylesheet" type="text/css"></head><body><!-- Generated by Doxygen 1.5.2 --><div class="tabs"> <ul> <li><a href="index.html"><span>Main Page</span></a></li> <li><a href="namespaces.html"><span>Namespaces</span></a></li> <li><a href="classes.html"><span>Classes</span></a></li> <li class="current"><a href="files.html"><span>Files</span></a></li> </ul></div><div class="tabs"> <ul> <li><a href="files.html"><span>File List</span></a></li> <li><a href="globals.html"><span>File Members</span></a></li> </ul></div><h1>config.h</h1><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="preprocessor">#ifndef CRYPTOPP_CONFIG_H</span><a name="l00002"></a>00002 <span class="preprocessor"></span><span class="preprocessor">#define CRYPTOPP_CONFIG_H</span><a name="l00003"></a>00003 <span class="preprocessor"></span><a name="l00004"></a>00004 <span class="comment">// ***************** Important Settings ********************</span><a name="l00005"></a>00005 <a name="l00006"></a>00006 <span class="comment">// define this if running on a big-endian CPU</span><a name="l00007"></a>00007 <span class="preprocessor">#if !defined(IS_LITTLE_ENDIAN) && (defined(__BIG_ENDIAN__) || defined(__sparc) || defined(__sparc__) || defined(__hppa__) || defined(__mips__) || (defined(__MWERKS__) && !defined(__INTEL__)))</span><a name="l00008"></a>00008 <span class="preprocessor"></span><span class="preprocessor"># define IS_BIG_ENDIAN</span><a name="l00009"></a>00009 <span class="preprocessor"></span><span class="preprocessor">#endif</span><a name="l00010"></a>00010 <span class="preprocessor"></span><a name="l00011"></a>00011 <span class="comment">// define this if running on a little-endian CPU</span><a name="l00012"></a>00012 <span class="comment">// big endian will be assumed if IS_LITTLE_ENDIAN is not defined</span><a name="l00013"></a>00013 <span class="preprocessor">#ifndef IS_BIG_ENDIAN</span><a name="l00014"></a>00014 <span class="preprocessor"></span><span class="preprocessor"># define IS_LITTLE_ENDIAN</span><a name="l00015"></a>00015 <span class="preprocessor"></span><span class="preprocessor">#endif</span><a name="l00016"></a>00016 <span class="preprocessor"></span><a name="l00017"></a>00017 <span class="comment">// define this if you want to disable all OS-dependent features,</span><a name="l00018"></a>00018 <span class="comment">// such as sockets and OS-provided random number generators</span><a name="l00019"></a>00019 <span class="comment">// #define NO_OS_DEPENDENCE</span><a name="l00020"></a>00020 <a name="l00021"></a>00021 <span class="comment">// Define this to use features provided by Microsoft's CryptoAPI.</span><a name="l00022"></a>00022 <span class="comment">// Currently the only feature used is random number generation.</span><a name="l00023"></a>00023 <span class="comment">// This macro will be ignored if NO_OS_DEPENDENCE is defined.</span><a name="l00024"></a>00024 <span class="preprocessor">#define USE_MS_CRYPTOAPI</span><a name="l00025"></a>00025 <span class="preprocessor"></span><a name="l00026"></a>00026 <span class="comment">// Define this to 1 to enforce the requirement in FIPS 186-2 Change Notice 1 that only 1024 bit moduli be used</span><a name="l00027"></a>00027 <span class="preprocessor">#ifndef DSA_1024_BIT_MODULUS_ONLY</span><a name="l00028"></a>00028 <span class="preprocessor"></span><span class="preprocessor"># define DSA_1024_BIT_MODULUS_ONLY 1</span><a name="l00029"></a>00029 <span class="preprocessor"></span><span class="preprocessor">#endif</span><a name="l00030"></a>00030 <span class="preprocessor"></span><a name="l00031"></a>00031 <span class="comment">// ***************** Less Important Settings ***************</span><a name="l00032"></a>00032 <a name="l00033"></a>00033 <span class="comment">// define this to retain (as much as possible) old deprecated function and class names</span><a name="l00034"></a>00034 <span class="comment">// #define CRYPTOPP_MAINTAIN_BACKWARDS_COMPATIBILITY</span><a name="l00035"></a>00035 <a name="l00036"></a>00036 <span class="preprocessor">#define GZIP_OS_CODE 0</span><a name="l00037"></a>00037 <span class="preprocessor"></span><a name="l00038"></a>00038 <span class="comment">// Try this if your CPU has 256K internal cache or a slow multiply instruction</span><a name="l00039"></a>00039 <span class="comment">// and you want a (possibly) faster IDEA implementation using log tables</span><a name="l00040"></a>00040 <span class="comment">// #define IDEA_LARGECACHE</span><a name="l00041"></a>00041 <a name="l00042"></a>00042 <span class="comment">// Define this if, for the linear congruential RNG, you want to use</span><a name="l00043"></a>00043 <span class="comment">// the original constants as specified in S.K. Park and K.W. Miller's</span><a name="l00044"></a>00044 <span class="comment">// CACM paper.</span><a name="l00045"></a>00045 <span class="comment">// #define LCRNG_ORIGINAL_NUMBERS</span><a name="l00046"></a>00046 <a name="l00047"></a>00047 <span class="comment">// choose which style of sockets to wrap (mostly useful for cygwin which has both)</span><a name="l00048"></a>00048 <span class="preprocessor">#define PREFER_BERKELEY_STYLE_SOCKETS</span><a name="l00049"></a>00049 <span class="preprocessor"></span><span class="comment">// #define PREFER_WINDOWS_STYLE_SOCKETS</span><a name="l00050"></a>00050 <a name="l00051"></a>00051 <span class="comment">// set the name of Rijndael cipher, was "Rijndael" before version 5.3</span><a name="l00052"></a>00052 <span class="preprocessor">#define CRYPTOPP_RIJNDAEL_NAME "AES"</span><a name="l00053"></a>00053 <span class="preprocessor"></span><a name="l00054"></a>00054 <span class="comment">// ***************** Important Settings Again ********************</span><a name="l00055"></a>00055 <span class="comment">// But the defaults should be ok.</span><a name="l00056"></a>00056 <a name="l00057"></a>00057 <span class="comment">// namespace support is now required</span><a name="l00058"></a>00058 <span class="preprocessor">#ifdef NO_NAMESPACE</span><a name="l00059"></a>00059 <span class="preprocessor"></span><span class="preprocessor"># error namespace support is now required</span><a name="l00060"></a>00060 <span class="preprocessor"></span><span class="preprocessor">#endif</span><a name="l00061"></a>00061 <span class="preprocessor"></span><a name="l00062"></a>00062 <span class="comment">// Define this to workaround a Microsoft CryptoAPI bug where</span><a name="l00063"></a>00063 <span class="comment">// each call to CryptAcquireContext causes a 100 KB memory leak.</span><a name="l00064"></a>00064 <span class="comment">// Defining this will cause Crypto++ to make only one call to CryptAcquireContext.</span><a name="l00065"></a>00065 <span class="preprocessor">#define WORKAROUND_MS_BUG_Q258000</span><a name="l00066"></a>00066 <span class="preprocessor"></span><a name="l00067"></a>00067 <span class="preprocessor">#ifdef CRYPTOPP_DOXYGEN_PROCESSING</span><a name="l00068"></a>00068 <span class="preprocessor"></span><span class="comment">// Avoid putting "CryptoPP::" in front of everything in Doxygen output</span><a name="l00069"></a>00069 <span class="preprocessor"># define CryptoPP</span><a name="l00070"></a>00070 <span class="preprocessor"></span><span class="preprocessor"># define NAMESPACE_BEGIN(x)</span><a name="l00071"></a>00071 <span class="preprocessor"></span><span class="preprocessor"># define NAMESPACE_END</span><a name="l00072"></a>00072 <span class="preprocessor"></span><span class="comment">// Get Doxygen to generate better documentation for these typedefs</span><a name="l00073"></a>00073 <span class="preprocessor"># define DOCUMENTED_TYPEDEF(x, y) class y : public x {};</span><a name="l00074"></a>00074 <span class="preprocessor"></span><span class="preprocessor">#else</span><a name="l00075"></a>00075 <span class="preprocessor"></span><span class="preprocessor"># define NAMESPACE_BEGIN(x) namespace x {</span><a name="l00076"></a>00076 <span class="preprocessor"></span><span class="preprocessor"># define NAMESPACE_END }</span><a name="l00077"></a>00077 <span class="preprocessor"></span><span class="preprocessor"># define DOCUMENTED_TYPEDEF(x, y) typedef x y;</span><a name="l00078"></a>00078 <span class="preprocessor"></span><span class="preprocessor">#endif</span><a name="l00079"></a>00079 <span class="preprocessor"></span><span class="preprocessor">#define ANONYMOUS_NAMESPACE_BEGIN namespace {</span><a name="l00080"></a>00080 <span class="preprocessor"></span><span class="preprocessor">#define USING_NAMESPACE(x) using namespace x;</span><a name="l00081"></a>00081 <span class="preprocessor"></span><span class="preprocessor">#define DOCUMENTED_NAMESPACE_BEGIN(x) namespace x {</span><a name="l00082"></a>00082 <span class="preprocessor"></span><span class="preprocessor">#define DOCUMENTED_NAMESPACE_END }</span><a name="l00083"></a>00083 <span class="preprocessor"></span><a name="l00084"></a>00084 <span class="comment">// What is the type of the third parameter to bind?</span><a name="l00085"></a>00085 <span class="comment">// For Unix, the new standard is ::socklen_t (typically unsigned int), and the old standard is int.</span><a name="l00086"></a>00086 <span class="comment">// Unfortunately there is no way to tell whether or not socklen_t is defined.</span><a name="l00087"></a>00087 <span class="comment">// To work around this, TYPE_OF_SOCKLEN_T is a macro so that you can change it from the makefile.</span><a name="l00088"></a>00088 <span class="preprocessor">#ifndef TYPE_OF_SOCKLEN_T</span><a name="l00089"></a>00089 <span class="preprocessor"></span><span class="preprocessor"># if defined(_WIN32) || defined(__CYGWIN__)</span><a name="l00090"></a>00090 <span class="preprocessor"></span><span class="preprocessor"># define TYPE_OF_SOCKLEN_T int</span><a name="l00091"></a>00091 <span class="preprocessor"></span><span class="preprocessor"># else</span><a name="l00092"></a>00092 <span class="preprocessor"></span><span class="preprocessor"># define TYPE_OF_SOCKLEN_T ::socklen_t</span><a name="l00093"></a>00093 <span class="preprocessor"></span><span class="preprocessor"># endif</span><a name="l00094"></a>00094 <span class="preprocessor"></span><span class="preprocessor">#endif</span><a name="l00095"></a>00095 <span class="preprocessor"></span><a name="l00096"></a>00096 <span class="preprocessor">#if defined(__CYGWIN__) && defined(PREFER_WINDOWS_STYLE_SOCKETS)</span><a name="l00097"></a>00097 <span class="preprocessor"></span><span class="preprocessor"># define __USE_W32_SOCKETS</span><a name="l00098"></a>00098 <span class="preprocessor"></span><span class="preprocessor">#endif</span><a name="l00099"></a>00099 <span class="preprocessor"></span>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -