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

📄 config_8h-source.html

📁 Crypto++是一个非常强大的密码学库,主要是功能全
💻 HTML
📖 第 1 页 / 共 2 页
字号:
<!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++: config.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>config.h</h1><div class="fragment"><pre>00001 <span class="preprocessor">#ifndef CRYPTOPP_CONFIG_H</span>00002 <span class="preprocessor"></span><span class="preprocessor">#define CRYPTOPP_CONFIG_H</span>00003 <span class="preprocessor"></span>00004 <span class="comment">// ***************** Important Settings ********************</span>00005 00006 <span class="comment">// define this if running on a big-endian CPU</span>00007 <span class="preprocessor">#if !defined(IS_LITTLE_ENDIAN) &amp;&amp; (defined(__sparc) || defined(__sparc__) || defined(__hppa__) || defined(__PPC__) || defined(__mips__) || (defined(__MWERKS__) &amp;&amp; !defined(__INTEL__)))</span>00008 <span class="preprocessor"></span><span class="preprocessor">#       define IS_BIG_ENDIAN</span>00009 <span class="preprocessor"></span><span class="preprocessor">#endif</span>00010 <span class="preprocessor"></span>00011 <span class="comment">// define this if running on a little-endian CPU</span>00012 <span class="comment">// big endian will be assumed if IS_LITTLE_ENDIAN is not defined</span>00013 <span class="preprocessor">#ifndef IS_BIG_ENDIAN</span>00014 <span class="preprocessor"></span><span class="preprocessor">#       define IS_LITTLE_ENDIAN</span>00015 <span class="preprocessor"></span><span class="preprocessor">#endif</span>00016 <span class="preprocessor"></span>00017 <span class="comment">// define this if you want to disable all OS-dependent features,</span>00018 <span class="comment">// such as sockets and OS-provided random number generators</span>00019 <span class="comment">// #define NO_OS_DEPENDENCE</span>00020 00021 <span class="comment">// Define this to use features provided by Microsoft's CryptoAPI.</span>00022 <span class="comment">// Currently the only feature used is random number generation.</span>00023 <span class="comment">// This macro will be ignored if NO_OS_DEPENDENCE is defined.</span>00024 <span class="preprocessor">#define USE_MS_CRYPTOAPI</span>00025 <span class="preprocessor"></span>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>00027 <span class="preprocessor">#ifndef DSA_1024_BIT_MODULUS_ONLY</span>00028 <span class="preprocessor"></span><span class="preprocessor">#       define DSA_1024_BIT_MODULUS_ONLY 1</span>00029 <span class="preprocessor"></span><span class="preprocessor">#endif</span>00030 <span class="preprocessor"></span>00031 <span class="comment">// ***************** Less Important Settings ***************</span>00032 00033 <span class="comment">// define this to retain (as much as possible) old deprecated function and class names</span>00034 <span class="comment">// #define CRYPTOPP_MAINTAIN_BACKWARDS_COMPATIBILITY</span>00035 00036 <span class="preprocessor">#define GZIP_OS_CODE 0</span>00037 <span class="preprocessor"></span>00038 <span class="comment">// Try this if your CPU has 256K internal cache or a slow multiply instruction</span>00039 <span class="comment">// and you want a (possibly) faster IDEA implementation using log tables</span>00040 <span class="comment">// #define IDEA_LARGECACHE</span>00041 00042 <span class="comment">// Try this if you have a large cache or your CPU is slow manipulating</span>00043 <span class="comment">// individual bytes.</span>00044 <span class="comment">// #define DIAMOND_USE_PERMTABLE</span>00045 00046 <span class="comment">// Define this if, for the linear congruential RNG, you want to use</span>00047 <span class="comment">// the original constants as specified in S.K. Park and K.W. Miller's</span>00048 <span class="comment">// CACM paper.</span>00049 <span class="comment">// #define LCRNG_ORIGINAL_NUMBERS</span>00050 00051 <span class="comment">// choose which style of sockets to wrap (mostly useful for cygwin which has both)</span>00052 <span class="preprocessor">#define PREFER_BERKELEY_STYLE_SOCKETS</span>00053 <span class="preprocessor"></span><span class="comment">// #define PREFER_WINDOWS_STYLE_SOCKETS</span>00054 00055 <span class="comment">// ***************** Important Settings Again ********************</span>00056 <span class="comment">// But the defaults should be ok.</span>00057 00058 <span class="comment">// namespace support is now required</span>00059 <span class="preprocessor">#ifdef NO_NAMESPACE</span>00060 <span class="preprocessor"></span><span class="preprocessor">#       error namespace support is now required</span>00061 <span class="preprocessor"></span><span class="preprocessor">#endif</span>00062 <span class="preprocessor"></span>00063 <span class="comment">// Define this to workaround a Microsoft CryptoAPI bug where</span>00064 <span class="comment">// each call to CryptAcquireContext causes a 100 KB memory leak.</span>00065 <span class="comment">// Defining this will cause Crypto++ to make only one call to CryptAcquireContext.</span>00066 <span class="preprocessor">#define WORKAROUND_MS_BUG_Q258000</span>00067 <span class="preprocessor"></span>00068 <span class="comment">// Avoid putting "CryptoPP::" in front of everything in Doxygen output</span>00069 <span class="preprocessor">#ifdef CRYPTOPP_DOXYGEN_PROCESSING</span>00070 <span class="preprocessor"></span><span class="preprocessor">#       define CryptoPP</span>00071 <span class="preprocessor"></span><span class="preprocessor">#       define NAMESPACE_BEGIN(x)</span>00072 <span class="preprocessor"></span><span class="preprocessor">#       define NAMESPACE_END</span>00073 <span class="preprocessor"></span><span class="preprocessor">#else</span>00074 <span class="preprocessor"></span><span class="preprocessor">#       define NAMESPACE_BEGIN(x) namespace x {</span>00075 <span class="preprocessor"></span><span class="preprocessor">#       define NAMESPACE_END }</span>00076 <span class="preprocessor"></span><span class="preprocessor">#endif</span>00077 <span class="preprocessor"></span><span class="preprocessor">#define ANONYMOUS_NAMESPACE_BEGIN namespace {</span>00078 <span class="preprocessor"></span><span class="preprocessor">#define USING_NAMESPACE(x) using namespace x;</span>00079 <span class="preprocessor"></span><span class="preprocessor">#define DOCUMENTED_NAMESPACE_BEGIN(x) namespace x {</span>00080 <span class="preprocessor"></span><span class="preprocessor">#define DOCUMENTED_NAMESPACE_END }</span>00081 <span class="preprocessor"></span>00082 <span class="comment">// What is the type of the third parameter to bind?</span>00083 <span class="comment">// For Unix, the new standard is ::socklen_t (typically unsigned int), and the old standard is int.</span>00084 <span class="comment">// Unfortunately there is no way to tell whether or not socklen_t is defined.</span>00085 <span class="comment">// To work around this, TYPE_OF_SOCKLEN_T is a macro so that you can change it from the makefile.</span>00086 <span class="preprocessor">#ifndef TYPE_OF_SOCKLEN_T</span>00087 <span class="preprocessor"></span><span class="preprocessor">#       if defined(_WIN32) || defined(__CYGWIN__)</span>00088 <span class="preprocessor"></span><span class="preprocessor">#               define TYPE_OF_SOCKLEN_T int</span>00089 <span class="preprocessor"></span><span class="preprocessor">#       else</span>00090 <span class="preprocessor"></span><span class="preprocessor">#               define TYPE_OF_SOCKLEN_T ::socklen_t</span>00091 <span class="preprocessor"></span><span class="preprocessor">#       endif</span>00092 <span class="preprocessor"></span><span class="preprocessor">#endif</span>00093 <span class="preprocessor"></span>00094 <span class="preprocessor">#if defined(__CYGWIN__) &amp;&amp; defined(PREFER_WINDOWS_STYLE_SOCKETS)</span>00095 <span class="preprocessor"></span><span class="preprocessor">#       define __USE_W32_SOCKETS</span>00096 <span class="preprocessor"></span><span class="preprocessor">#endif</span>00097 <span class="preprocessor"></span>00098 <span class="keyword">typedef</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> byte;     <span class="comment">// moved outside namespace for Borland C++Builder 5</span>00099 00100 NAMESPACE_BEGIN(CryptoPP)00101 00102 <span class="keyword">typedef</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">short</span> word16;00103 <span class="keyword">typedef</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> word32;00104 00105 <span class="preprocessor">#if defined(__GNUC__) || defined(__MWERKS__)</span>00106 <span class="preprocessor"></span><span class="preprocessor">#       define WORD64_AVAILABLE</span>00107 <span class="preprocessor"></span>        <span class="keyword">typedef</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> <span class="keywordtype">long</span> word64;00108 <span class="preprocessor">#       define W64LIT(x) x##LL</span>00109 <span class="preprocessor"></span><span class="preprocessor">#elif defined(_MSC_VER) || defined(__BCPLUSPLUS__)</span>00110 <span class="preprocessor"></span><span class="preprocessor">#       define WORD64_AVAILABLE</span>00111 <span class="preprocessor"></span>        <span class="keyword">typedef</span> <span class="keywordtype">unsigned</span> __int64 word64;00112 <span class="preprocessor">#       define W64LIT(x) x##ui64</span>00113 <span class="preprocessor"></span><span class="preprocessor">#endif</span>00114 <span class="preprocessor"></span>00115 <span class="comment">// defined this if your CPU is not 64-bit</span>00116 <span class="preprocessor">#if defined(WORD64_AVAILABLE) &amp;&amp; !defined(__alpha)</span>00117 <span class="preprocessor"></span><span class="preprocessor">#       define SLOW_WORD64</span>00118 <span class="preprocessor"></span><span class="preprocessor">#endif</span>00119 <span class="preprocessor"></span>00120 <span class="comment">// word should have the same size as your CPU registers</span>00121 <span class="comment">// dword should be twice as big as word</span>00122 00123 <span class="preprocessor">#if (defined(__GNUC__) &amp;&amp; !defined(__alpha)) || defined(__MWERKS__)</span>00124 <span class="preprocessor"></span>        <span class="keyword">typedef</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> word;00125         <span class="keyword">typedef</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> <span class="keywordtype">long</span> dword;00126 <span class="preprocessor">#elif defined(_MSC_VER) || defined(__BCPLUSPLUS__)</span>00127 <span class="preprocessor"></span>        <span class="keyword">typedef</span> <span class="keywordtype">unsigned</span> __int32 word;00128         <span class="keyword">typedef</span> <span class="keywordtype">unsigned</span> __int64 dword;00129 <span class="preprocessor">#else</span>00130 <span class="preprocessor"></span>        <span class="keyword">typedef</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> word;00131         <span class="keyword">typedef</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> dword;00132 <span class="preprocessor">#endif</span>00133 <span class="preprocessor"></span>00134 <span class="keyword">const</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> WORD_SIZE = <span class="keyword">sizeof</span>(word);00135 <span class="keyword">const</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> WORD_BITS = WORD_SIZE * 8;00136 00137 <span class="preprocessor">#define LOW_WORD(x) (word)(x)</span>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -