Crypto++  5.6.3
Free C++ class library of cryptographic schemes
config.h
Go to the documentation of this file.
1 // config.h - written and placed in the public domain by Wei Dai
2 
3 //! \file config.h
4 //! \brief Library configuration file
5 
6 #ifndef CRYPTOPP_CONFIG_H
7 #define CRYPTOPP_CONFIG_H
8 
9 // ***************** Important Settings ********************
10 
11 // define this if running on a big-endian CPU
12 #if !defined(IS_LITTLE_ENDIAN) && (defined(__BIG_ENDIAN__) || (defined(__s390__) || defined(__s390x__) || defined(__zarch__)) || (defined(__m68k__) || defined(__MC68K__)) || defined(__sparc) || defined(__sparc__) || defined(__hppa__) || defined(__MIPSEB__) || defined(__ARMEB__) || (defined(__MWERKS__) && !defined(__INTEL__)))
13 # define IS_BIG_ENDIAN
14 #endif
15 
16 // define this if running on a little-endian CPU
17 // big endian will be assumed if IS_LITTLE_ENDIAN is not defined
18 #ifndef IS_BIG_ENDIAN
19 # define IS_LITTLE_ENDIAN
20 #endif
21 
22 // Sanity checks. Some processors have more than big-, little- and bi-endian modes. PDP mode, where order results in "4312", should
23 // raise red flags immediately. Additionally, mis-classified machines, like (previosuly) S/390, should raise red flags immediately.
24 #if defined(IS_BIG_ENDIAN) && defined(__GNUC__) && defined(__BYTE_ORDER__) && (__BYTE_ORDER__ != __ORDER_BIG_ENDIAN__)
25 # error "IS_BIG_ENDIAN is set, but __BYTE_ORDER__ does not equal __ORDER_BIG_ENDIAN__"
26 #endif
27 #if defined(IS_LITTLE_ENDIAN) && defined(__GNUC__) && defined(__BYTE_ORDER__) && (__BYTE_ORDER__ != __ORDER_LITTLE_ENDIAN__)
28 # error "IS_LITTLE_ENDIAN is set, but __BYTE_ORDER__ does not equal __ORDER_LITTLE_ENDIAN__"
29 #endif
30 
31 // Define this if you want to disable all OS-dependent features,
32 // such as sockets and OS-provided random number generators
33 // #define NO_OS_DEPENDENCE
34 
35 // Define this to use features provided by Microsoft's CryptoAPI.
36 // Currently the only feature used is Windows random number generation.
37 // This macro will be ignored if NO_OS_DEPENDENCE is defined.
38 // #define USE_MS_CRYPTOAPI
39 
40 // Define this to use features provided by Microsoft's CryptoNG API.
41 // CryptoNG API is available in Vista and above and its cross platform,
42 // including desktop apps and store apps. Currently the only feature
43 // used is Windows random number generation.
44 // This macro will be ignored if NO_OS_DEPENDENCE is defined.
45 // #define USE_MS_CNGAPI
46 
47 // If the user did not make a choice, then select CryptoNG if either
48 // Visual Studio 2015 is available, or Windows 10 or above is available.
49 #if !defined(USE_MS_CRYPTOAPI) && !defined(USE_MS_CNGAPI)
50 # if (_MSC_VER >= 1900) || ((WINVER >= 0x0A00 /*_WIN32_WINNT_WIN10*/) || (_WIN32_WINNT >= 0x0A00 /*_WIN32_WINNT_WIN10*/))
51 # define USE_MS_CNGAPI
52 # else
53 # define USE_MS_CRYPTOAPI
54 # endif
55 #endif
56 
57 // Define this to ensure C/C++ standard compliance and respect for GCC aliasing rules and other alignment fodder. If you
58 // experience a break with GCC at -O3, you should try this first. Guard it in case its set on the command line (and it differs).
59 #ifndef CRYPTOPP_NO_UNALIGNED_DATA_ACCESS
60 // # define CRYPTOPP_NO_UNALIGNED_DATA_ACCESS
61 #endif
62 
63 // Define this to choose the FIPS 202 version of SHA3, and not the original version of SHA3. NIST selected Keccak as SHA3
64 // in January 2013. SHA3 was finalized in FIPS 202 in August 2015, and it was a modified version of the original selection.
65 // If CRYPTOPP_USE_FIPS_202_SHA3 is defined, then sha3_fips_202.txt test vectors will be used instead of sha3.txt.
66 // #ifndef CRYPTOPP_USE_FIPS_202_SHA3
67 // # define CRYPTOPP_USE_FIPS_202_SHA3
68 // #endif
69 
70 // ***************** Less Important Settings ***************
71 
72 // Library version
73 #define CRYPTOPP_VERSION 563
74 
75 // Define this if you want to set a prefix for TestData/ and TestVectors/
76 // Be mindful of the trailing slash since its simple concatenation.
77 // g++ ... -DCRYPTOPP_DATA_DIR='"/tmp/cryptopp_test/share/"'
78 #ifndef CRYPTOPP_DATA_DIR
79 # define CRYPTOPP_DATA_DIR ""
80 #endif
81 
82 // define this to retain (as much as possible) old deprecated function and class names
83 // #define CRYPTOPP_MAINTAIN_BACKWARDS_COMPATIBILITY
84 
85 // Define this to retain (as much as possible) ABI and binary compatibility with Crypto++ 5.6.2.
86 // Also see https://cryptopp.com/wiki/Config.h#Avoid_MAINTAIN_BACKWARDS_COMPATIBILITY
87 #if (CRYPTOPP_VERSION <= 600)
88 # if !defined(CRYPTOPP_NO_BACKWARDS_COMPATIBILITY_562) && !defined(CRYPTOPP_MAINTAIN_BACKWARDS_COMPATIBILITY_562)
89 # define CRYPTOPP_MAINTAIN_BACKWARDS_COMPATIBILITY_562
90 # endif
91 #endif
92 
93 // Define this if you want or need the library's memcpy_s and memmove_s.
94 // See http://github.com/weidai11/cryptopp/issues/28.
95 // #if !defined(CRYPTOPP_WANT_SECURE_LIB)
96 // # define CRYPTOPP_WANT_SECURE_LIB
97 // #endif
98 
99 // File system code to write to GZIP archive.
100 #if !defined(GZIP_OS_CODE)
101 # define GZIP_OS_CODE 0
102 #endif
103 
104 // Try this if your CPU has 256K internal cache or a slow multiply instruction
105 // and you want a (possibly) faster IDEA implementation using log tables
106 // #define IDEA_LARGECACHE
107 
108 // Define this if, for the linear congruential RNG, you want to use
109 // the original constants as specified in S.K. Park and K.W. Miller's
110 // CACM paper.
111 // #define LCRNG_ORIGINAL_NUMBERS
112 
113 // Define this if you want Integer's operator<< to honor std::showbase (and
114 // std::noshowbase). If defined, Integer will use a suffix of 'b', 'o', 'h'
115 // or '.' (the last for decimal) when std::showbase is in effect. If
116 // std::noshowbase is set, then the suffix is not added to the Integer. If
117 // not defined, existing behavior is preserved and Integer will use a suffix
118 // of 'b', 'o', 'h' or '.' (the last for decimal).
119 // #define CRYPTOPP_USE_STD_SHOWBASE
120 
121 // choose which style of sockets to wrap (mostly useful for MinGW which has both)
122 #if !defined(NO_BERKELEY_STYLE_SOCKETS) && !defined(PREFER_BERKELEY_STYLE_SOCKETS)
123 # define PREFER_BERKELEY_STYLE_SOCKETS
124 #endif
125 
126 // #if !defined(NO_WINDOWS_STYLE_SOCKETS) && !defined(PREFER_WINDOWS_STYLE_SOCKETS)
127 // # define PREFER_WINDOWS_STYLE_SOCKETS
128 // #endif
129 
130 // set the name of Rijndael cipher, was "Rijndael" before version 5.3
131 #define CRYPTOPP_RIJNDAEL_NAME "AES"
132 
133 // CRYPTOPP_INIT_PRIORITY attempts to manage initialization of C++ static objects.
134 // Under GCC, the library uses init_priority attribute in the range
135 // [CRYPTOPP_INIT_PRIORITY, CRYPTOPP_INIT_PRIORITY+100]. Under Windows,
136 // CRYPTOPP_INIT_PRIORITY enlists "#pragma init_seg(lib)".
137 // #define CRYPTOPP_INIT_PRIORITY 250
138 
139 // CRYPTOPP_USER_PRIORITY is for other libraries and user code that is using Crypto++
140 // and managing C++ static object creation. It is guaranteed not to conflict with
141 // values used by (or would be used by) the Crypto++ library.
142 #if defined(CRYPTOPP_INIT_PRIORITY) && (CRYPTOPP_INIT_PRIORITY > 0)
143 # define CRYPTOPP_USER_PRIORITY (CRYPTOPP_INIT_PRIORITY + 101)
144 #else
145 # define CRYPTOPP_USER_PRIORITY 250
146 #endif
147 
148 // ***************** Important Settings Again ********************
149 // But the defaults should be ok.
150 
151 // namespace support is now required
152 #ifdef NO_NAMESPACE
153 # error namespace support is now required
154 #endif
155 
156 // Define this to workaround a Microsoft CryptoAPI bug where
157 // each call to CryptAcquireContext causes a 100 KB memory leak.
158 // Defining this will cause Crypto++ to make only one call to CryptAcquireContext.
159 #define WORKAROUND_MS_BUG_Q258000
160 
161 #ifdef CRYPTOPP_DOXYGEN_PROCESSING
162 // Document the namespce exists. Put it here before CryptoPP is undefined below.
163 //! \namespace CryptoPP
164 //! \brief Crypto++ library namespace
165 //! \details Nearly all classes are located in the CryptoPP namespace. Within
166 //! the namespace, there are two additional namespaces.
167 //! <ul>
168 //! <li>Name - namespace for names used with \p NameValuePairs and documented in argnames.h
169 //! <li>Weak - namespace for weak and wounded algorithms, like ARC4, MD5 and Pananma
170 //! </ul>
171 namespace CryptoPP { }
172 // Bring in the symbols fund in the weak namespace; and fold Weak1 into Weak
173 # define CRYPTOPP_ENABLE_NAMESPACE_WEAK 1
174 # define Weak1 Weak
175 // Avoid putting "CryptoPP::" in front of everything in Doxygen output
176 # define CryptoPP
177 # define NAMESPACE_BEGIN(x)
178 # define NAMESPACE_END
179 // Get Doxygen to generate better documentation for these typedefs
180 # define DOCUMENTED_TYPEDEF(x, y) class y : public x {};
181 // Make "protected" "private" so the functions and members are not documented
182 # define protected private
183 #else
184 # define NAMESPACE_BEGIN(x) namespace x {
185 # define NAMESPACE_END }
186 # define DOCUMENTED_TYPEDEF(x, y) typedef x y;
187 #endif
188 #define ANONYMOUS_NAMESPACE_BEGIN namespace {
189 #define ANONYMOUS_NAMESPACE_END }
190 #define USING_NAMESPACE(x) using namespace x;
191 #define DOCUMENTED_NAMESPACE_BEGIN(x) namespace x {
192 #define DOCUMENTED_NAMESPACE_END }
193 
194 // What is the type of the third parameter to bind?
195 // For Unix, the new standard is ::socklen_t (typically unsigned int), and the old standard is int.
196 // Unfortunately there is no way to tell whether or not socklen_t is defined.
197 // To work around this, TYPE_OF_SOCKLEN_T is a macro so that you can change it from the makefile.
198 #ifndef TYPE_OF_SOCKLEN_T
199 # if defined(_WIN32) || defined(__CYGWIN__)
200 # define TYPE_OF_SOCKLEN_T int
201 # else
202 # define TYPE_OF_SOCKLEN_T ::socklen_t
203 # endif
204 #endif
205 
206 #if defined(__CYGWIN__) && defined(PREFER_WINDOWS_STYLE_SOCKETS)
207 # define __USE_W32_SOCKETS
208 #endif
209 
210 typedef unsigned char byte; // put in global namespace to avoid ambiguity with other byte typedefs
211 
212 NAMESPACE_BEGIN(CryptoPP)
213 
214 typedef unsigned short word16;
215 typedef unsigned int word32;
216 
217 #if defined(_MSC_VER) || defined(__BORLANDC__)
218  typedef unsigned __int64 word64;
219  #define W64LIT(x) x##ui64
220 #elif ((__arm64__ || __aarch64__) && (_LP64 || __LP64__))
221  typedef unsigned long word64;
222  #define W64LIT(x) x##UL
223 #else
224  typedef unsigned long long word64;
225  #define W64LIT(x) x##ULL
226 #endif
227 
228 // define large word type, used for file offsets and such
229 typedef word64 lword;
230 const lword LWORD_MAX = W64LIT(0xffffffffffffffff);
231 
232 // Clang pretends to be VC++, too.
233 // See http://github.com/weidai11/cryptopp/issues/147
234 #if defined(_MSC_VER) && defined(__clang__)
235 # error: "Unsupported configuration"
236 #endif
237 
238 #ifdef __GNUC__
239  #define CRYPTOPP_GCC_VERSION (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__)
240 #endif
241 
242 // Apple and LLVM's Clang. Apple Clang version 7.0 roughly equals LLVM Clang version 3.7
243 #if defined(__clang__ ) && !defined(__apple_build_version__)
244  #define CRYPTOPP_LLVM_CLANG_VERSION (__clang_major__ * 10000 + __clang_minor__ * 100 + __clang_patchlevel__)
245  #define CRYPTOPP_CLANG_INTEGRATED_ASSEMBLER 1
246 #elif defined(__clang__ ) && defined(__apple_build_version__)
247  #define CRYPTOPP_APPLE_CLANG_VERSION (__clang_major__ * 10000 + __clang_minor__ * 100 + __clang_patchlevel__)
248  #define CRYPTOPP_CLANG_INTEGRATED_ASSEMBLER 1
249 #endif
250 
251 #ifdef _MSC_VER
252  #define CRYPTOPP_MSC_VERSION (_MSC_VER)
253 #endif
254 
255 // Need GCC 4.6/Clang 1.7/Apple Clang 2.0 or above due to "GCC diagnostic {push|pop}"
256 #if (CRYPTOPP_GCC_VERSION >= 40600) || (CRYPTOPP_LLVM_CLANG_VERSION >= 10700) || (CRYPTOPP_APPLE_CLANG_VERSION >= 20000)
257  #define CRYPTOPP_GCC_DIAGNOSTIC_AVAILABLE 1
258 #endif
259 
260 // Clang due to "Inline assembly operands don't work with .intel_syntax", http://llvm.org/bugs/show_bug.cgi?id=24232
261 // TODO: supply the upper version when LLVM fixes it. We set it to 20.0 for compilation purposes.
262 #if (defined(CRYPTOPP_LLVM_CLANG_VERSION) && CRYPTOPP_LLVM_CLANG_VERSION <= 200000) || (defined(CRYPTOPP_APPLE_CLANG_VERSION) && CRYPTOPP_APPLE_CLANG_VERSION <= 200000) || defined(CRYPTOPP_CLANG_INTEGRATED_ASSEMBLER)
263  #define CRYPTOPP_DISABLE_INTEL_ASM 1
264 #endif
265 
266 // define hword, word, and dword. these are used for multiprecision integer arithmetic
267 // Intel compiler won't have _umul128 until version 10.0. See http://softwarecommunity.intel.com/isn/Community/en-US/forums/thread/30231625.aspx
268 #if (defined(_MSC_VER) && (!defined(__INTEL_COMPILER) || __INTEL_COMPILER >= 1000) && (defined(_M_X64) || defined(_M_IA64))) || (defined(__DECCXX) && defined(__alpha__)) || (defined(__INTEL_COMPILER) && defined(__x86_64__)) || (defined(__SUNPRO_CC) && defined(__x86_64__))
269  typedef word32 hword;
270  typedef word64 word;
271 #else
272  #define CRYPTOPP_NATIVE_DWORD_AVAILABLE
273  #if defined(__alpha__) || defined(__ia64__) || defined(_ARCH_PPC64) || defined(__x86_64__) || defined(__mips64) || defined(__sparc64__)
274  #if defined(__GNUC__) && !defined(__INTEL_COMPILER) && !(CRYPTOPP_GCC_VERSION == 40001 && defined(__APPLE__)) && CRYPTOPP_GCC_VERSION >= 30400
275  // GCC 4.0.1 on MacOS X is missing __umodti3 and __udivti3
276  // mode(TI) division broken on amd64 with GCC earlier than GCC 3.4
277  typedef word32 hword;
278  typedef word64 word;
279  typedef __uint128_t dword;
280  typedef __uint128_t word128;
281  #define CRYPTOPP_WORD128_AVAILABLE
282  #else
283  // if we're here, it means we're on a 64-bit CPU but we don't have a way to obtain 128-bit multiplication results
284  typedef word16 hword;
285  typedef word32 word;
286  typedef word64 dword;
287  #endif
288  #else
289  // being here means the native register size is probably 32 bits or less
290  #define CRYPTOPP_BOOL_SLOW_WORD64 1
291  typedef word16 hword;
292  typedef word32 word;
293  typedef word64 dword;
294  #endif
295 #endif
296 #ifndef CRYPTOPP_BOOL_SLOW_WORD64
297  #define CRYPTOPP_BOOL_SLOW_WORD64 0
298 #endif
299 
300 const unsigned int WORD_SIZE = sizeof(word);
301 const unsigned int WORD_BITS = WORD_SIZE * 8;
302 
303 NAMESPACE_END
304 
305 #ifndef CRYPTOPP_L1_CACHE_LINE_SIZE
306  // This should be a lower bound on the L1 cache line size. It's used for defense against timing attacks.
307  // Also see http://stackoverflow.com/questions/794632/programmatically-get-the-cache-line-size.
308  #if defined(_M_X64) || defined(__x86_64__) || (__arm64__) || (__aarch64__)
309  #define CRYPTOPP_L1_CACHE_LINE_SIZE 64
310  #else
311  // L1 cache line size is 32 on Pentium III and earlier
312  #define CRYPTOPP_L1_CACHE_LINE_SIZE 32
313  #endif
314 #endif
315 
316 #if defined(_MSC_VER)
317  #if _MSC_VER == 1200
318  #include <malloc.h>
319  #endif
320  #if _MSC_VER > 1200 || defined(_mm_free)
321  #define CRYPTOPP_MSVC6PP_OR_LATER // VC 6 processor pack or later
322  #else
323  #define CRYPTOPP_MSVC6_NO_PP // VC 6 without processor pack
324  #endif
325 #endif
326 
327 #ifndef CRYPTOPP_ALIGN_DATA
328  #if defined(CRYPTOPP_MSVC6PP_OR_LATER)
329  #define CRYPTOPP_ALIGN_DATA(x) __declspec(align(x))
330  #elif defined(__GNUC__)
331  #define CRYPTOPP_ALIGN_DATA(x) __attribute__((aligned(x)))
332  #else
333  #define CRYPTOPP_ALIGN_DATA(x)
334  #endif
335 #endif
336 
337 #ifndef CRYPTOPP_SECTION_ALIGN16
338 #if defined(__GNUC__) && !defined(__APPLE__)
339  // the alignment attribute doesn't seem to work without this section attribute when -fdata-sections is turned on
340  #define CRYPTOPP_SECTION_ALIGN16 __attribute__((section ("CryptoPP_Align16")))
341  #else
342  #define CRYPTOPP_SECTION_ALIGN16
343  #endif
344 #endif
345 
346 // The section attribute attempts to initialize CPU flags to avoid Valgrind findings above -O1
347 #if ((__MACH__ >= 1) && ((CRYPTOPP_LLVM_CLANG_VERSION >= 30600) || (CRYPTOPP_APPLE_CLANG_VERSION >= 70100) || (CRYPTOPP_GCC_VERSION >= 40300)))
348  #define CRYPTOPP_SECTION_INIT __attribute__((section ("__DATA,__data")))
349 #elif ((__ELF__ >= 1) && (CRYPTOPP_GCC_VERSION >= 40300))
350  #define CRYPTOPP_SECTION_INIT __attribute__((section ("nocommon")))
351 #else
352  #define CRYPTOPP_SECTION_INIT
353 #endif
354 
355 #if defined(_MSC_VER) || defined(__fastcall)
356  #define CRYPTOPP_FASTCALL __fastcall
357 #else
358  #define CRYPTOPP_FASTCALL
359 #endif
360 
361 // VC60 workaround: it doesn't allow typename in some places
362 #if defined(_MSC_VER) && (_MSC_VER < 1300)
363 #define CPP_TYPENAME
364 #else
365 #define CPP_TYPENAME typename
366 #endif
367 
368 // VC60 workaround: can't cast unsigned __int64 to float or double
369 #if defined(_MSC_VER) && !defined(CRYPTOPP_MSVC6PP_OR_LATER)
370 #define CRYPTOPP_VC6_INT64 (__int64)
371 #else
372 #define CRYPTOPP_VC6_INT64
373 #endif
374 
375 #ifdef _MSC_VER
376 #define CRYPTOPP_NO_VTABLE __declspec(novtable)
377 #else
378 #define CRYPTOPP_NO_VTABLE
379 #endif
380 
381 #ifdef _MSC_VER
382  // 4127: conditional expression is constant
383  // 4231: nonstandard extension used : 'extern' before template explicit instantiation
384  // 4250: dominance
385  // 4251: member needs to have dll-interface
386  // 4275: base needs to have dll-interface
387  // 4505: unreferenced local function
388  // 4512: assignment operator not generated
389  // 4660: explicitly instantiating a class that's already implicitly instantiated
390  // 4661: no suitable definition provided for explicit template instantiation request
391  // 4786: identifer was truncated in debug information
392  // 4355: 'this' : used in base member initializer list
393  // 4910: '__declspec(dllexport)' and 'extern' are incompatible on an explicit instantiation
394 # pragma warning(disable: 4127 4231 4250 4251 4275 4505 4512 4660 4661 4786 4355 4910)
395  // Security related, possible defects
396  // http://blogs.msdn.com/b/vcblog/archive/2010/12/14/off-by-default-compiler-warnings-in-visual-c.aspx
397 # pragma warning(once: 4191 4242 4263 4264 4266 4302 4826 4905 4906 4928)
398 #endif
399 
400 #ifdef __BORLANDC__
401 // 8037: non-const function called for const object. needed to work around BCB2006 bug
402 # pragma warn -8037
403 #endif
404 
405 // [GCC Bug 53431] "C++ preprocessor ignores #pragma GCC diagnostic". Clang honors it.
406 #if CRYPTOPP_GCC_DIAGNOSTIC_AVAILABLE
407 # pragma GCC diagnostic ignored "-Wunknown-pragmas"
408 # pragma GCC diagnostic ignored "-Wunused-function"
409 #endif
410 
411 // You may need to force include a C++ header on Android when using STLPort to ensure
412 // _STLPORT_VERSION is defined: CXXFLAGS="-DNDEBUG -g2 -O2 -std=c++11 -include iosfwd"
413 // TODO: Figure out C++17 and lack of std::uncaught_exception
414 #if (defined(_MSC_VER) && _MSC_VER <= 1300) || defined(__MWERKS__) || (defined(_STLPORT_VERSION) && ((_STLPORT_VERSION < 0x450) || defined(_STLP_NO_UNCAUGHT_EXCEPT_SUPPORT)))
415 #define CRYPTOPP_DISABLE_UNCAUGHT_EXCEPTION
416 #endif
417 
418 #ifndef CRYPTOPP_DISABLE_UNCAUGHT_EXCEPTION
419 #define CRYPTOPP_UNCAUGHT_EXCEPTION_AVAILABLE
420 #endif
421 
422 #ifdef CRYPTOPP_DISABLE_X86ASM // for backwards compatibility: this macro had both meanings
423 #define CRYPTOPP_DISABLE_ASM
424 #define CRYPTOPP_DISABLE_SSE2
425 #endif
426 
427 // Apple's Clang prior to 5.0 cannot handle SSE2 (and Apple does not use LLVM Clang numbering...)
428 #if defined(CRYPTOPP_APPLE_CLANG_VERSION) && (CRYPTOPP_APPLE_CLANG_VERSION < 50000)
429 # define CRYPTOPP_DISABLE_ASM
430 #endif
431 
432 // Sun Studio 12 provides GCC inline assembly, http://blogs.oracle.com/x86be/entry/gcc_style_asm_inlining_support
433 // We can enable SSE2 for Sun Studio in the makefile with -D__SSE2__, but users may not compile with it.
434 #if !defined(CRYPTOPP_DISABLE_ASM) && !defined(__SSE2__) && defined(__x86_64__) && (__SUNPRO_CC >= 0x5100)
435 # define __SSE2__
436 #endif
437 
438 #if !defined(CRYPTOPP_DISABLE_ASM) && ((defined(_MSC_VER) && defined(_M_IX86)) || (defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__))))
439  // C++Builder 2010 does not allow "call label" where label is defined within inline assembly
440  #define CRYPTOPP_X86_ASM_AVAILABLE
441 
442  #if !defined(CRYPTOPP_DISABLE_SSE2) && (defined(CRYPTOPP_MSVC6PP_OR_LATER) || CRYPTOPP_GCC_VERSION >= 30300 || defined(__SSE2__))
443  #define CRYPTOPP_BOOL_SSE2_ASM_AVAILABLE 1
444  #else
445  #define CRYPTOPP_BOOL_SSE2_ASM_AVAILABLE 0
446  #endif
447 
448  // SSE3 was actually introduced in GNU as 2.17, which was released 6/23/2006, but we can't tell what version of binutils is installed.
449  // GCC 4.1.2 was released on 2/13/2007, so we'll use that as a proxy for the binutils version. Also see the output of
450  // `gcc -dM -E -march=native - < /dev/null | grep -i SSE` for preprocessor defines available.
451  #if !defined(CRYPTOPP_DISABLE_SSSE3) && (_MSC_VER >= 1400 || CRYPTOPP_GCC_VERSION >= 40102 || defined(__SSSE3__))
452  #define CRYPTOPP_BOOL_SSSE3_ASM_AVAILABLE 1
453  #else
454  #define CRYPTOPP_BOOL_SSSE3_ASM_AVAILABLE 0
455  #endif
456 #endif
457 
458 #if !defined(CRYPTOPP_DISABLE_ASM) && defined(_MSC_VER) && defined(_M_X64)
459  #define CRYPTOPP_X64_MASM_AVAILABLE
460 #endif
461 
462 #if !defined(CRYPTOPP_DISABLE_ASM) && defined(__GNUC__) && defined(__x86_64__)
463  #define CRYPTOPP_X64_ASM_AVAILABLE
464 #endif
465 
466 #if !defined(CRYPTOPP_DISABLE_SSE2) && (defined(CRYPTOPP_MSVC6PP_OR_LATER) || defined(__SSE2__)) && !defined(_M_ARM)
467  #define CRYPTOPP_BOOL_SSE2_INTRINSICS_AVAILABLE 1
468 #else
469  #define CRYPTOPP_BOOL_SSE2_INTRINSICS_AVAILABLE 0
470 #endif
471 
472 // Intrinsics availible in GCC 4.3 (http://gcc.gnu.org/gcc-4.3/changes.html) and
473 // MSVC 2008 (http://msdn.microsoft.com/en-us/library/bb892950%28v=vs.90%29.aspx)
474 // SunCC could generate SSE4 at 12.1, but the intrinsics are missing until 12.4. However, we don't know
475 // when to activate the code paths because SunCC does not indicate it in the preprocessor with macros.
476 #if !defined(CRYPTOPP_DISABLE_SSE2) && !defined(CRYPTOPP_DISABLE_SSE4) && (((_MSC_VER >= 1500) && !defined(_M_ARM)) || (defined(__SSE4_1__) && defined(__SSE4_2__)))
477  #define CRYPTOPP_BOOL_SSE4_INTRINSICS_AVAILABLE 1
478 #else
479  #define CRYPTOPP_BOOL_SSE4_INTRINSICS_AVAILABLE 0
480 #endif
481 
482 #if !defined(CRYPTOPP_DISABLE_SSSE3) && !defined(CRYPTOPP_DISABLE_AESNI) && CRYPTOPP_BOOL_SSE2_INTRINSICS_AVAILABLE && (CRYPTOPP_GCC_VERSION >= 40400 || _MSC_FULL_VER >= 150030729 || __INTEL_COMPILER >= 1110 || defined(__AES__))
483  #define CRYPTOPP_BOOL_AESNI_INTRINSICS_AVAILABLE 1
484 #else
485  #define CRYPTOPP_BOOL_AESNI_INTRINSICS_AVAILABLE 0
486 #endif
487 
488 // Requires ARMv7 and ACLE 1.0. Testing shows ARMv7 is really ARMv7a under most toolchains.
489 #if !defined(CRYPTOPP_BOOL_NEON_INTRINSICS_AVAILABLE) && !defined(CRYPTOPP_DISABLE_ASM)
490 # if defined(__ARM_NEON__) || defined(__ARM_NEON) || defined(_M_ARM)
491 # define CRYPTOPP_BOOL_NEON_INTRINSICS_AVAILABLE 1
492 # endif
493 #endif
494 
495 // Requires ARMv8 and ACLE 2.0. For GCC, requires 4.8 and above.
496 // Microsoft plans to support ARM-64, but its not clear how to detect it.
497 // TODO: Add MSC_VER and ARM-64 platform define when available
498 #if !defined(CRYPTOPP_BOOL_ARM_CRC32_INTRINSICS_AVAILABLE) && !defined(CRYPTOPP_DISABLE_ASM)
499 # if defined(__ARM_FEATURE_CRC32) || defined(_M_ARM64)
500 # define CRYPTOPP_BOOL_ARM_CRC32_INTRINSICS_AVAILABLE 1
501 # endif
502 #endif
503 
504 // Requires ARMv8 and ACLE 2.0. For GCC, requires 4.8 and above.
505 // Microsoft plans to support ARM-64, but its not clear how to detect it.
506 // TODO: Add MSC_VER and ARM-64 platform define when available
507 #if !defined(CRYPTOPP_BOOL_ARM_CRYPTO_INTRINSICS_AVAILABLE) && !defined(CRYPTOPP_DISABLE_ASM)
508 # if defined(__ARM_FEATURE_CRYPTO) || defined(_M_ARM64)
509 # define CRYPTOPP_BOOL_ARM_CRYPTO_INTRINSICS_AVAILABLE 1
510 # endif
511 #endif
512 
513 #if CRYPTOPP_BOOL_SSE2_INTRINSICS_AVAILABLE || CRYPTOPP_BOOL_SSE2_ASM_AVAILABLE || CRYPTOPP_BOOL_NEON_INTRINSICS_AVAILABLE || defined(CRYPTOPP_X64_MASM_AVAILABLE)
514  #define CRYPTOPP_BOOL_ALIGN16 1
515 #else
516  #define CRYPTOPP_BOOL_ALIGN16 0
517 #endif
518 
519 // how to allocate 16-byte aligned memory (for SSE2)
520 #if defined(CRYPTOPP_MSVC6PP_OR_LATER)
521  #define CRYPTOPP_MM_MALLOC_AVAILABLE
522 #elif defined(__APPLE__)
523  #define CRYPTOPP_APPLE_MALLOC_AVAILABLE
524 #elif defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__)
525  #define CRYPTOPP_MALLOC_ALIGNMENT_IS_16
526 #elif defined(__linux__) || defined(__sun__) || defined(__CYGWIN__)
527  #define CRYPTOPP_MEMALIGN_AVAILABLE
528 #else
529  #define CRYPTOPP_NO_ALIGNED_ALLOC
530 #endif
531 
532 // Apple always provides 16-byte aligned, and tells us to use calloc
533 // http://developer.apple.com/library/mac/documentation/Performance/Conceptual/ManagingMemory/Articles/MemoryAlloc.html
534 
535 // how to disable inlining
536 #if defined(_MSC_VER) && _MSC_VER >= 1300
537 # define CRYPTOPP_NOINLINE_DOTDOTDOT
538 # define CRYPTOPP_NOINLINE __declspec(noinline)
539 #elif defined(__GNUC__)
540 # define CRYPTOPP_NOINLINE_DOTDOTDOT
541 # define CRYPTOPP_NOINLINE __attribute__((noinline))
542 #else
543 # define CRYPTOPP_NOINLINE_DOTDOTDOT ...
544 # define CRYPTOPP_NOINLINE
545 #endif
546 
547 // how to declare class constants
548 #if (defined(_MSC_VER) && _MSC_VER <= 1300) || defined(__INTEL_COMPILER) || defined(__BORLANDC__)
549 # define CRYPTOPP_CONSTANT(x) enum {x};
550 #else
551 # define CRYPTOPP_CONSTANT(x) static const int x;
552 #endif
553 
554 // Linux provides X32, which is 32-bit integers, longs and pointers on x86_64 using the full x86_64 register set.
555 // Detect via __ILP32__ (http://wiki.debian.org/X32Port). However, __ILP32__ shows up in more places than
556 // the System V ABI specs calls out, like on just about any 32-bit system with Clang.
557 #if ((__ILP32__ >= 1) || (_ILP32 >= 1)) && defined(__x86_64__)
558  #define CRYPTOPP_BOOL_X32 1
559 #else
560  #define CRYPTOPP_BOOL_X32 0
561 #endif
562 
563 // see http://predef.sourceforge.net/prearch.html
564 #if (defined(_M_IX86) || defined(__i386__) || defined(__i386) || defined(_X86_) || defined(__I86__) || defined(__INTEL__)) && !CRYPTOPP_BOOL_X32
565  #define CRYPTOPP_BOOL_X86 1
566 #else
567  #define CRYPTOPP_BOOL_X86 0
568 #endif
569 
570 #if (defined(_M_X64) || defined(__x86_64__)) && !CRYPTOPP_BOOL_X32
571  #define CRYPTOPP_BOOL_X64 1
572 #else
573  #define CRYPTOPP_BOOL_X64 0
574 #endif
575 
576 // Undo the ASM and Intrinsic related defines due to X32.
577 #if CRYPTOPP_BOOL_X32
578 # undef CRYPTOPP_BOOL_X64
579 # undef CRYPTOPP_X64_ASM_AVAILABLE
580 # undef CRYPTOPP_X64_MASM_AVAILABLE
581 #endif
582 
583 #if defined(__arm__) || defined(__aarch32__) || defined(_M_ARM)
584  #define CRYPTOPP_BOOL_ARM32 1
585 #else
586  #define CRYPTOPP_BOOL_ARM32 0
587 #endif
588 
589 // Microsoft plans to support ARM-64, but its not clear how to detect it.
590 // TODO: Add MSC_VER and ARM-64 platform define when available
591 #if defined(__arm64__) || defined(__aarch64__) || defined(_M_ARM64)
592  #define CRYPTOPP_BOOL_ARM64 1
593 #else
594  #define CRYPTOPP_BOOL_ARM64 0
595 #endif
596 
597 #if !defined(CRYPTOPP_NO_UNALIGNED_DATA_ACCESS) && !defined(CRYPTOPP_ALLOW_UNALIGNED_DATA_ACCESS)
598 #if (CRYPTOPP_BOOL_X64 || CRYPTOPP_BOOL_X86 || CRYPTOPP_BOOL_X32 || defined(__powerpc__) || (__ARM_FEATURE_UNALIGNED >= 1))
599  #define CRYPTOPP_ALLOW_UNALIGNED_DATA_ACCESS
600 #endif
601 #endif
602 
603 // ***************** determine availability of OS features ********************
604 
605 #ifndef NO_OS_DEPENDENCE
606 
607 #if defined(_WIN32) || defined(__CYGWIN__)
608 #define CRYPTOPP_WIN32_AVAILABLE
609 #endif
610 
611 #if defined(__unix__) || defined(__MACH__) || defined(__NetBSD__) || defined(__sun)
612 #define CRYPTOPP_UNIX_AVAILABLE
613 #endif
614 
615 #if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__)
616 #define CRYPTOPP_BSD_AVAILABLE
617 #endif
618 
619 #if defined(CRYPTOPP_WIN32_AVAILABLE) || defined(CRYPTOPP_UNIX_AVAILABLE)
620 # define HIGHRES_TIMER_AVAILABLE
621 #endif
622 
623 #ifdef CRYPTOPP_WIN32_AVAILABLE
624 # if !defined(WINAPI_FAMILY)
625 # define THREAD_TIMER_AVAILABLE
626 # elif defined(WINAPI_FAMILY)
627 # if (WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP))
628 # define THREAD_TIMER_AVAILABLE
629 # endif
630 # endif
631 #endif
632 
633 #ifdef CRYPTOPP_UNIX_AVAILABLE
634 # define HAS_BERKELEY_STYLE_SOCKETS
635 # define SOCKETS_AVAILABLE
636 #endif
637 
638 // Sockets are only available under Windows Runtime desktop partition apps (despite the MSDN literature)
639 #ifdef CRYPTOPP_WIN32_AVAILABLE
640 # define HAS_WINDOWS_STYLE_SOCKETS
641 # if !defined(WINAPI_FAMILY)
642 # define SOCKETS_AVAILABLE
643 # elif defined(WINAPI_FAMILY)
644 # if (WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP))
645 # define SOCKETS_AVAILABLE
646 # endif
647 # endif
648 #endif
649 
650 #if defined(HAS_WINDOWS_STYLE_SOCKETS) && (!defined(HAS_BERKELEY_STYLE_SOCKETS) || defined(PREFER_WINDOWS_STYLE_SOCKETS))
651 # define USE_WINDOWS_STYLE_SOCKETS
652 #else
653 # define USE_BERKELEY_STYLE_SOCKETS
654 #endif
655 
656 #if defined(CRYPTOPP_WIN32_AVAILABLE) && defined(SOCKETS_AVAILABLE) && !defined(USE_BERKELEY_STYLE_SOCKETS)
657 # define WINDOWS_PIPES_AVAILABLE
658 #endif
659 
660 #if defined(CRYPTOPP_UNIX_AVAILABLE) || defined(CRYPTOPP_DOXYGEN_PROCESSING)
661 # define NONBLOCKING_RNG_AVAILABLE
662 # define BLOCKING_RNG_AVAILABLE
663 # define OS_RNG_AVAILABLE
664 # define HAS_PTHREADS
665 # define THREADS_AVAILABLE
666 #endif
667 
668 #ifdef CRYPTOPP_WIN32_AVAILABLE
669 # if !defined(WINAPI_FAMILY)
670 # define HAS_WINTHREADS
671 # define THREADS_AVAILABLE
672 # define NONBLOCKING_RNG_AVAILABLE
673 # define OS_RNG_AVAILABLE
674 # elif defined(WINAPI_FAMILY)
675 # if (WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP))
676 # define HAS_WINTHREADS
677 # define THREADS_AVAILABLE
678 # define NONBLOCKING_RNG_AVAILABLE
679 # define OS_RNG_AVAILABLE
680 # elif !(WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP))
681 # if ((WINVER >= 0x0A00 /*_WIN32_WINNT_WIN10*/) || (_WIN32_WINNT >= 0x0A00 /*_WIN32_WINNT_WIN10*/))
682 # define NONBLOCKING_RNG_AVAILABLE
683 # define OS_RNG_AVAILABLE
684 # endif
685 # endif
686 # endif
687 #endif
688 
689 #endif // NO_OS_DEPENDENCE
690 
691 // ***************** DLL related ********************
692 
693 #if defined(CRYPTOPP_WIN32_AVAILABLE) && !defined(CRYPTOPP_DOXYGEN_PROCESSING)
694 
695 #ifdef CRYPTOPP_EXPORTS
696 #define CRYPTOPP_IS_DLL
697 #define CRYPTOPP_DLL __declspec(dllexport)
698 #elif defined(CRYPTOPP_IMPORTS)
699 #define CRYPTOPP_IS_DLL
700 #define CRYPTOPP_DLL __declspec(dllimport)
701 #else
702 #define CRYPTOPP_DLL
703 #endif
704 
705 #define CRYPTOPP_API __cdecl
706 
707 #else // not CRYPTOPP_WIN32_AVAILABLE
708 
709 #define CRYPTOPP_DLL
710 #define CRYPTOPP_API
711 
712 #endif // CRYPTOPP_WIN32_AVAILABLE
713 
714 #if defined(__MWERKS__)
715 #define CRYPTOPP_EXTERN_DLL_TEMPLATE_CLASS extern class CRYPTOPP_DLL
716 #elif defined(__BORLANDC__) || defined(__SUNPRO_CC)
717 #define CRYPTOPP_EXTERN_DLL_TEMPLATE_CLASS template class CRYPTOPP_DLL
718 #else
719 #define CRYPTOPP_EXTERN_DLL_TEMPLATE_CLASS extern template class CRYPTOPP_DLL
720 #endif
721 
722 #if defined(CRYPTOPP_MANUALLY_INSTANTIATE_TEMPLATES) && !defined(CRYPTOPP_IMPORTS)
723 #define CRYPTOPP_DLL_TEMPLATE_CLASS template class CRYPTOPP_DLL
724 #else
725 #define CRYPTOPP_DLL_TEMPLATE_CLASS CRYPTOPP_EXTERN_DLL_TEMPLATE_CLASS
726 #endif
727 
728 #if defined(__MWERKS__)
729 #define CRYPTOPP_EXTERN_STATIC_TEMPLATE_CLASS extern class
730 #elif defined(__BORLANDC__) || defined(__SUNPRO_CC)
731 #define CRYPTOPP_EXTERN_STATIC_TEMPLATE_CLASS template class
732 #else
733 #define CRYPTOPP_EXTERN_STATIC_TEMPLATE_CLASS extern template class
734 #endif
735 
736 #if defined(CRYPTOPP_MANUALLY_INSTANTIATE_TEMPLATES) && !defined(CRYPTOPP_EXPORTS)
737 #define CRYPTOPP_STATIC_TEMPLATE_CLASS template class
738 #else
739 #define CRYPTOPP_STATIC_TEMPLATE_CLASS CRYPTOPP_EXTERN_STATIC_TEMPLATE_CLASS
740 #endif
741 
742 // ************** Unused variable ***************
743 
744 // Portable way to suppress warnings.
745 // Moved from misc.h due to circular depenedencies.
746 #define CRYPTOPP_UNUSED(x) ((void)x)
747 
748 // ************** Deprecated ***************
749 
750 #if (CRYPTOPP_GCC_VERSION >= 40500) || (CRYPTOPP_LLVM_CLANG_VERSION >= 20800)
751 # define CRYPTOPP_DEPRECATED(msg) __attribute__((deprecated (msg)));
752 #elif (CRYPTOPP_GCC_VERSION)
753 # define CRYPTOPP_DEPRECATED(msg) __attribute__((deprecated));
754 #else
755 # define CRYPTOPP_DEPRECATED(msg)
756 #endif
757 
758 // ***************** C++11 related ********************
759 
760 // Visual Studio began at VS2010, http://msdn.microsoft.com/en-us/library/hh567368%28v=vs.110%29.aspx.
761 // Intel and C++11 language features, http://software.intel.com/en-us/articles/c0x-features-supported-by-intel-c-compiler
762 // GCC and C++11 language features, http://gcc.gnu.org/projects/cxx0x.html
763 // Clang and C++11 language features, http://clang.llvm.org/cxx_status.html
764 #if ((_MSC_VER >= 1600) || (__cplusplus >= 201103L)) && !defined(_STLPORT_VERSION)
765 # define CRYPTOPP_CXX11 1
766 #endif
767 
768 // Hack ahead. Apple's standard library does not have C++'s unique_ptr in C++11. We can't
769 // test for unique_ptr directly because some of the non-Apple Clangs on OS X fail the same
770 // way. However, modern standard libraries have <forward_list>, so we test for it instead.
771 // Thanks to Jonathan Wakely for devising the clever test for modern/ancient versions.
772 // TODO: test under Xcode 3, where g++ is really g++.
773 #if defined(__APPLE__) && defined(__clang__)
774 # if !(defined(__has_include) && __has_include(<forward_list>))
775 # undef CRYPTOPP_CXX11
776 # endif
777 #endif
778 
779 // C++11 or C++14 is available
780 #if defined(CRYPTOPP_CXX11)
781 
782 // atomics: MS at VS2012 (17.00); GCC at 4.4; Clang at 3.1/3.2; Intel 13.0; SunCC 12.5.
783 #if (CRYPTOPP_MSC_VERSION >= 1700)
784 # define CRYPTOPP_CXX11_ATOMICS 1
785 #elif (__INTEL_COMPILER >= 1300)
786 # define CRYPTOPP_CXX11_ATOMICS 1
787 #elif defined(__clang__)
788 # if __has_feature(cxx_atomic)
789 # define CRYPTOPP_CXX11_ATOMICS 1
790 # endif
791 #elif (CRYPTOPP_GCC_VERSION >= 40400)
792 # define CRYPTOPP_CXX11_ATOMICS 1
793 #elif (__SUNPRO_CC >= 0x5140)
794 # define CRYPTOPP_CXX11_ATOMICS 1
795 #endif // atomics
796 
797 // synchronization: MS at VS2012 (17.00); GCC at 4.4; Clang at 3.3; Xcode 5.0; Intel 12.0; SunCC 12.4.
798 // TODO: verify Clang and Intel versions; find __has_feature(x) extension for Clang
799 #if (CRYPTOPP_MSC_VERSION >= 1700)
800 # define CRYPTOPP_CXX11_SYNCHRONIZATION 1
801 #elif (__INTEL_COMPILER >= 1200)
802 # define CRYPTOPP_CXX11_SYNCHRONIZATION 1
803 #elif (CRYPTOPP_LLVM_CLANG_VERSION >= 30300) || (CRYPTOPP_APPLE_CLANG_VERSION >= 50000)
804 # define CRYPTOPP_CXX11_SYNCHRONIZATION 1
805 #elif (CRYPTOPP_GCC_VERSION >= 40400)
806 # define CRYPTOPP_CXX11_SYNCHRONIZATION 1
807 #elif (__SUNPRO_CC >= 0x5130)
808 # define CRYPTOPP_CXX11_SYNCHRONIZATION 1
809 #endif // synchronization
810 
811 // alignof/alignas: MS at VS2015 (19.00); GCC at 4.8; Clang at 3.3; Intel 15.0; SunCC 12.4.
812 #if (CRYPTOPP_MSC_VERSION >= 1900)
813 # define CRYPTOPP_CXX11_ALIGNAS 1
814 # define CRYPTOPP_CXX11_ALIGNOF 1
815 #elif (__INTEL_COMPILER >= 1500)
816 # define CRYPTOPP_CXX11_ALIGNAS 1
817 # define CRYPTOPP_CXX11_ALIGNOF 1
818 #elif defined(__clang__)
819 # if __has_feature(cxx_alignas)
820 # define CRYPTOPP_CXX11_ALIGNAS 1
821 # endif
822 # if __has_feature(cxx_alignof)
823 # define CRYPTOPP_CXX11_ALIGNOF 1
824 # endif
825 #elif (CRYPTOPP_GCC_VERSION >= 40800)
826 # define CRYPTOPP_CXX11_ALIGNAS 1
827 # define CRYPTOPP_CXX11_ALIGNOF 1
828 #elif (__SUNPRO_CC >= 0x5130)
829 # define CRYPTOPP_CXX11_ALIGNAS 1
830 # define CRYPTOPP_CXX11_ALIGNOF 1
831 #endif // alignof/alignas
832 
833 // noexcept: MS at VS2015 (19.00); GCC at 4.6; Clang at 3.0; Intel 14.0; SunCC 12.4.
834 #if (CRYPTOPP_MSC_VERSION >= 1900)
835 # define CRYPTOPP_CXX11_NOEXCEPT 1
836 #elif (__INTEL_COMPILER >= 1400)
837 # define CRYPTOPP_CXX11_NOEXCEPT 1
838 #elif defined(__clang__)
839 # if __has_feature(cxx_noexcept)
840 # define CRYPTOPP_CXX11_NOEXCEPT 1
841 # endif
842 #elif (CRYPTOPP_GCC_VERSION >= 40600)
843 # define CRYPTOPP_CXX11_NOEXCEPT 1
844 #elif (__SUNPRO_CC >= 0x5130)
845 # define CRYPTOPP_CXX11_NOEXCEPT 1
846 #endif // noexcept compilers
847 
848 // variadic templates: MS at VS2013 (18.00); GCC at 4.3; Clang at 2.9; Intel 12.1; SunCC 12.4.
849 #if (CRYPTOPP_MSC_VERSION >= 1800)
850 # define CRYPTOPP_CXX11_VARIADIC_TEMPLATES 1
851 #elif (__INTEL_COMPILER >= 1210)
852 # define CRYPTOPP_CXX11_VARIADIC_TEMPLATES 1
853 #elif defined(__clang__)
854 # if __has_feature(cxx_variadic_templates)
855 # define CRYPTOPP_CXX11_VARIADIC_TEMPLATES 1
856 # endif
857 #elif (CRYPTOPP_GCC_VERSION >= 40300)
858 # define CRYPTOPP_CXX11_VARIADIC_TEMPLATES 1
859 #elif (__SUNPRO_CC >= 0x5130)
860 # define CRYPTOPP_CXX11_VARIADIC_TEMPLATES 1
861 #endif // variadic templates
862 
863 // TODO: Emplacement, R-values and Move semantics
864 // Needed because we are catching warnings with GCC and MSC
865 
866 #endif // CRYPTOPP_CXX11
867 
868 #if defined(CRYPTOPP_CXX11_NOEXCEPT)
869 # define CRYPTOPP_THROW noexcept(false)
870 # define CRYPTOPP_NO_THROW noexcept(true)
871 #else
872 # define CRYPTOPP_THROW
873 # define CRYPTOPP_NO_THROW
874 #endif // CRYPTOPP_CXX11_NOEXCEPT
875 
876 // Hack... CRYPTOPP_ALIGN_DATA is defined earlier, before C++11 alignas availability is determined
877 #if defined(CRYPTOPP_CXX11_ALIGNAS)
878 # undef CRYPTOPP_ALIGN_DATA
879 # define CRYPTOPP_ALIGN_DATA(x) alignas(x)
880 #endif // CRYPTOPP_CXX11_ALIGNAS
881 
882 // OK to comment the following out, but please report it so we can fix it.
883 // C++17 value taken from http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2015/n4567.pdf.
884 #if (defined(__cplusplus) && (__cplusplus >= 199711L) && (__cplusplus < 201402L)) && !defined(CRYPTOPP_UNCAUGHT_EXCEPTION_AVAILABLE)
885 # error "std::uncaught_exception is not available. This is likely a configuration error."
886 #endif
887 
888 #endif
Crypto++ library namespace.