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 #else
221  typedef unsigned long long word64;
222  #define W64LIT(x) x##ULL
223 #endif
224 
225 // define large word type, used for file offsets and such
226 typedef word64 lword;
227 const lword LWORD_MAX = W64LIT(0xffffffffffffffff);
228 
229 // Clang pretends to be VC++, too.
230 // See http://github.com/weidai11/cryptopp/issues/147
231 #if defined(_MSC_VER) && defined(__clang__)
232 # error: "Unsupported configuration"
233 #endif
234 
235 #ifdef __GNUC__
236  #define CRYPTOPP_GCC_VERSION (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__)
237 #endif
238 
239 // Apple and LLVM's Clang. Apple Clang version 7.0 roughly equals LLVM Clang version 3.7
240 #if defined(__clang__ ) && !defined(__apple_build_version__)
241  #define CRYPTOPP_LLVM_CLANG_VERSION (__clang_major__ * 10000 + __clang_minor__ * 100 + __clang_patchlevel__)
242  #define CRYPTOPP_CLANG_INTEGRATED_ASSEMBLER 1
243 #elif defined(__clang__ ) && defined(__apple_build_version__)
244  #define CRYPTOPP_APPLE_CLANG_VERSION (__clang_major__ * 10000 + __clang_minor__ * 100 + __clang_patchlevel__)
245  #define CRYPTOPP_CLANG_INTEGRATED_ASSEMBLER 1
246 #endif
247 
248 #ifdef _MSC_VER
249  #define CRYPTOPP_MSC_VERSION (_MSC_VER)
250 #endif
251 
252 // Need GCC 4.6/Clang 1.7/Apple Clang 2.0 or above due to "GCC diagnostic {push|pop}"
253 #if (CRYPTOPP_GCC_VERSION >= 40600) || (CRYPTOPP_LLVM_CLANG_VERSION >= 10700) || (CRYPTOPP_APPLE_CLANG_VERSION >= 20000)
254  #define CRYPTOPP_GCC_DIAGNOSTIC_AVAILABLE 1
255 #endif
256 
257 // Clang due to "Inline assembly operands don't work with .intel_syntax", http://llvm.org/bugs/show_bug.cgi?id=24232
258 // TODO: supply the upper version when LLVM fixes it. We set it to 20.0 for compilation purposes.
259 #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)
260  #define CRYPTOPP_DISABLE_INTEL_ASM 1
261 #endif
262 
263 // define hword, word, and dword. these are used for multiprecision integer arithmetic
264 // Intel compiler won't have _umul128 until version 10.0. See http://softwarecommunity.intel.com/isn/Community/en-US/forums/thread/30231625.aspx
265 #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__))
266  typedef word32 hword;
267  typedef word64 word;
268 #else
269  #define CRYPTOPP_NATIVE_DWORD_AVAILABLE
270  #if defined(__alpha__) || defined(__ia64__) || defined(_ARCH_PPC64) || defined(__x86_64__) || defined(__mips64) || defined(__sparc64__)
271  #if defined(__GNUC__) && !defined(__INTEL_COMPILER) && !(CRYPTOPP_GCC_VERSION == 40001 && defined(__APPLE__)) && CRYPTOPP_GCC_VERSION >= 30400
272  // GCC 4.0.1 on MacOS X is missing __umodti3 and __udivti3
273  // mode(TI) division broken on amd64 with GCC earlier than GCC 3.4
274  typedef word32 hword;
275  typedef word64 word;
276  typedef __uint128_t dword;
277  typedef __uint128_t word128;
278  #define CRYPTOPP_WORD128_AVAILABLE
279  #else
280  // 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
281  typedef word16 hword;
282  typedef word32 word;
283  typedef word64 dword;
284  #endif
285  #else
286  // being here means the native register size is probably 32 bits or less
287  #define CRYPTOPP_BOOL_SLOW_WORD64 1
288  typedef word16 hword;
289  typedef word32 word;
290  typedef word64 dword;
291  #endif
292 #endif
293 #ifndef CRYPTOPP_BOOL_SLOW_WORD64
294  #define CRYPTOPP_BOOL_SLOW_WORD64 0
295 #endif
296 
297 const unsigned int WORD_SIZE = sizeof(word);
298 const unsigned int WORD_BITS = WORD_SIZE * 8;
299 
300 NAMESPACE_END
301 
302 #ifndef CRYPTOPP_L1_CACHE_LINE_SIZE
303  // This should be a lower bound on the L1 cache line size. It's used for defense against timing attacks.
304  // Also see http://stackoverflow.com/questions/794632/programmatically-get-the-cache-line-size.
305  #if defined(_M_X64) || defined(__x86_64__) || (__arm64__) || (__aarch64__)
306  #define CRYPTOPP_L1_CACHE_LINE_SIZE 64
307  #else
308  // L1 cache line size is 32 on Pentium III and earlier
309  #define CRYPTOPP_L1_CACHE_LINE_SIZE 32
310  #endif
311 #endif
312 
313 #if defined(_MSC_VER)
314  #if _MSC_VER == 1200
315  #include <malloc.h>
316  #endif
317  #if _MSC_VER > 1200 || defined(_mm_free)
318  #define CRYPTOPP_MSVC6PP_OR_LATER // VC 6 processor pack or later
319  #else
320  #define CRYPTOPP_MSVC6_NO_PP // VC 6 without processor pack
321  #endif
322 #endif
323 
324 #ifndef CRYPTOPP_ALIGN_DATA
325  #if defined(CRYPTOPP_MSVC6PP_OR_LATER)
326  #define CRYPTOPP_ALIGN_DATA(x) __declspec(align(x))
327  #elif defined(__GNUC__)
328  #define CRYPTOPP_ALIGN_DATA(x) __attribute__((aligned(x)))
329  #else
330  #define CRYPTOPP_ALIGN_DATA(x)
331  #endif
332 #endif
333 
334 #ifndef CRYPTOPP_SECTION_ALIGN16
335 #if defined(__GNUC__) && !defined(__APPLE__)
336  // the alignment attribute doesn't seem to work without this section attribute when -fdata-sections is turned on
337  #define CRYPTOPP_SECTION_ALIGN16 __attribute__((section ("CryptoPP_Align16")))
338  #else
339  #define CRYPTOPP_SECTION_ALIGN16
340  #endif
341 #endif
342 
343 #if defined(_MSC_VER) || defined(__fastcall)
344  #define CRYPTOPP_FASTCALL __fastcall
345 #else
346  #define CRYPTOPP_FASTCALL
347 #endif
348 
349 // VC60 workaround: it doesn't allow typename in some places
350 #if defined(_MSC_VER) && (_MSC_VER < 1300)
351 #define CPP_TYPENAME
352 #else
353 #define CPP_TYPENAME typename
354 #endif
355 
356 // VC60 workaround: can't cast unsigned __int64 to float or double
357 #if defined(_MSC_VER) && !defined(CRYPTOPP_MSVC6PP_OR_LATER)
358 #define CRYPTOPP_VC6_INT64 (__int64)
359 #else
360 #define CRYPTOPP_VC6_INT64
361 #endif
362 
363 #ifdef _MSC_VER
364 #define CRYPTOPP_NO_VTABLE __declspec(novtable)
365 #else
366 #define CRYPTOPP_NO_VTABLE
367 #endif
368 
369 #ifdef _MSC_VER
370  // 4127: conditional expression is constant
371  // 4231: nonstandard extension used : 'extern' before template explicit instantiation
372  // 4250: dominance
373  // 4251: member needs to have dll-interface
374  // 4275: base needs to have dll-interface
375  // 4505: unreferenced local function
376  // 4512: assignment operator not generated
377  // 4660: explicitly instantiating a class that's already implicitly instantiated
378  // 4661: no suitable definition provided for explicit template instantiation request
379  // 4786: identifer was truncated in debug information
380  // 4355: 'this' : used in base member initializer list
381  // 4910: '__declspec(dllexport)' and 'extern' are incompatible on an explicit instantiation
382 # pragma warning(disable: 4127 4231 4250 4251 4275 4505 4512 4660 4661 4786 4355 4910)
383  // Security related, possible defects
384  // http://blogs.msdn.com/b/vcblog/archive/2010/12/14/off-by-default-compiler-warnings-in-visual-c.aspx
385 # pragma warning(once: 4191 4242 4263 4264 4266 4302 4826 4905 4906 4928)
386 #endif
387 
388 #ifdef __BORLANDC__
389 // 8037: non-const function called for const object. needed to work around BCB2006 bug
390 # pragma warn -8037
391 #endif
392 
393 // [GCC Bug 53431] "C++ preprocessor ignores #pragma GCC diagnostic". Clang honors it.
394 #if CRYPTOPP_GCC_DIAGNOSTIC_AVAILABLE
395 # pragma GCC diagnostic ignored "-Wunknown-pragmas"
396 # pragma GCC diagnostic ignored "-Wunused-function"
397 #endif
398 
399 #if (defined(_MSC_VER) && _MSC_VER <= 1300) || defined(__MWERKS__) || (defined(_STLPORT_VERSION) && ((_STLPORT_VERSION < 0x450) || defined(_STLP_NO_UNCAUGHT_EXCEPT_SUPPORT)))
400 #define CRYPTOPP_DISABLE_UNCAUGHT_EXCEPTION
401 #endif
402 
403 #ifndef CRYPTOPP_DISABLE_UNCAUGHT_EXCEPTION
404 #define CRYPTOPP_UNCAUGHT_EXCEPTION_AVAILABLE
405 #endif
406 
407 #ifdef CRYPTOPP_DISABLE_X86ASM // for backwards compatibility: this macro had both meanings
408 #define CRYPTOPP_DISABLE_ASM
409 #define CRYPTOPP_DISABLE_SSE2
410 #endif
411 
412 // Apple's Clang prior to 5.0 cannot handle SSE2 (and Apple does not use LLVM Clang numbering...)
413 #if defined(CRYPTOPP_APPLE_CLANG_VERSION) && (CRYPTOPP_APPLE_CLANG_VERSION < 50000)
414 # define CRYPTOPP_DISABLE_ASM
415 #endif
416 
417 // Sun Studio 12 provides GCC inline assembly, http://blogs.oracle.com/x86be/entry/gcc_style_asm_inlining_support
418 // We can enable SSE2 for Sun Studio in the makefile with -D__SSE2__, but users may not compile with it.
419 #if !defined(CRYPTOPP_DISABLE_ASM) && !defined(__SSE2__) && defined(__x86_64__) && (__SUNPRO_CC >= 0x5100)
420 # define __SSE2__
421 #endif
422 
423 #if !defined(CRYPTOPP_DISABLE_ASM) && ((defined(_MSC_VER) && defined(_M_IX86)) || (defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__))))
424  // C++Builder 2010 does not allow "call label" where label is defined within inline assembly
425  #define CRYPTOPP_X86_ASM_AVAILABLE
426 
427  #if !defined(CRYPTOPP_DISABLE_SSE2) && (defined(CRYPTOPP_MSVC6PP_OR_LATER) || CRYPTOPP_GCC_VERSION >= 30300 || defined(__SSE2__))
428  #define CRYPTOPP_BOOL_SSE2_ASM_AVAILABLE 1
429  #else
430  #define CRYPTOPP_BOOL_SSE2_ASM_AVAILABLE 0
431  #endif
432 
433  // 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.
434  // 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
435  // `gcc -dM -E -march=native - < /dev/null | grep -i SSE` for preprocessor defines available.
436  #if !defined(CRYPTOPP_DISABLE_SSSE3) && (_MSC_VER >= 1400 || CRYPTOPP_GCC_VERSION >= 40102 || defined(__SSSE3__))
437  #define CRYPTOPP_BOOL_SSSE3_ASM_AVAILABLE 1
438  #else
439  #define CRYPTOPP_BOOL_SSSE3_ASM_AVAILABLE 0
440  #endif
441 #endif
442 
443 #if !defined(CRYPTOPP_DISABLE_ASM) && defined(_MSC_VER) && defined(_M_X64)
444  #define CRYPTOPP_X64_MASM_AVAILABLE
445 #endif
446 
447 #if !defined(CRYPTOPP_DISABLE_ASM) && defined(__GNUC__) && defined(__x86_64__)
448  #define CRYPTOPP_X64_ASM_AVAILABLE
449 #endif
450 
451 #if !defined(CRYPTOPP_DISABLE_SSE2) && (defined(CRYPTOPP_MSVC6PP_OR_LATER) || defined(__SSE2__)) && !defined(_M_ARM)
452  #define CRYPTOPP_BOOL_SSE2_INTRINSICS_AVAILABLE 1
453 #else
454  #define CRYPTOPP_BOOL_SSE2_INTRINSICS_AVAILABLE 0
455 #endif
456 
457 // Intrinsics availible in GCC 4.3 (http://gcc.gnu.org/gcc-4.3/changes.html) and
458 // MSVC 2008 (http://msdn.microsoft.com/en-us/library/bb892950%28v=vs.90%29.aspx)
459 // SunCC could generate SSE4 at 12.1, but the intrinsics are missing until 12.4.
460 #if !defined(CRYPTOPP_DISABLE_SSE2) && !defined(CRYPTOPP_DISABLE_SSE4) && (((_MSC_VER >= 1500) && !defined(_M_ARM)) || defined(__SSE4_2__) || (__SUNPRO_CC >= 0x5130))
461  #define CRYPTOPP_BOOL_SSE4_INTRINSICS_AVAILABLE 1
462 #else
463  #define CRYPTOPP_BOOL_SSE4_INTRINSICS_AVAILABLE 0
464 #endif
465 
466 #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__))
467  #define CRYPTOPP_BOOL_AESNI_INTRINSICS_AVAILABLE 1
468 #else
469  #define CRYPTOPP_BOOL_AESNI_INTRINSICS_AVAILABLE 0
470 #endif
471 
472 // Requires ARMv7 and ACLE 1.0. Testing shows ARMv7 is really ARMv7a under most toolchains.
473 #if !defined(CRYPTOPP_BOOL_NEON_INTRINSICS_AVAILABLE) && !defined(CRYPTOPP_DISABLE_ASM)
474 # if defined(__ARM_NEON__) || defined(__ARM_NEON) || defined(_M_ARM)
475 # define CRYPTOPP_BOOL_NEON_INTRINSICS_AVAILABLE 1
476 # endif
477 #endif
478 
479 // Requires ARMv8 and ACLE 2.0.
480 // Microsoft plans to support ARM-64, but its not clear how to detect it.
481 // TODO: Add MSC_VER and ARM-64 platform define when available
482 #if !defined(CRYPTOPP_BOOL_ARM_CRC32_INTRINSICS_AVAILABLE) && !defined(CRYPTOPP_DISABLE_ASM)
483 # if defined(__ARM_FEATURE_CRC32) || defined(_M_ARM64)
484 # define CRYPTOPP_BOOL_ARM_CRC32_INTRINSICS_AVAILABLE 1
485 # endif
486 #endif
487 
488 // Requires ARMv8 and ACLE 2.0.
489 // Microsoft plans to support ARM-64, but its not clear how to detect it.
490 // TODO: Add MSC_VER and ARM-64 platform define when available
491 #if !defined(CRYPTOPP_BOOL_ARM_CRYPTO_INTRINSICS_AVAILABLE) && !defined(CRYPTOPP_DISABLE_ASM)
492 # if defined(__ARM_FEATURE_CRYPTO) || defined(_M_ARM64)
493 # define CRYPTOPP_BOOL_ARM_CRYPTO_INTRINSICS_AVAILABLE 1
494 # endif
495 #endif
496 
497 #if CRYPTOPP_BOOL_SSE2_INTRINSICS_AVAILABLE || CRYPTOPP_BOOL_SSE2_ASM_AVAILABLE || CRYPTOPP_BOOL_NEON_INTRINSICS_AVAILABLE || defined(CRYPTOPP_X64_MASM_AVAILABLE)
498  #define CRYPTOPP_BOOL_ALIGN16 1
499 #else
500  #define CRYPTOPP_BOOL_ALIGN16 0
501 #endif
502 
503 // how to allocate 16-byte aligned memory (for SSE2)
504 #if defined(CRYPTOPP_MSVC6PP_OR_LATER)
505  #define CRYPTOPP_MM_MALLOC_AVAILABLE
506 #elif defined(__APPLE__)
507  #define CRYPTOPP_APPLE_MALLOC_AVAILABLE
508 #elif defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__)
509  #define CRYPTOPP_MALLOC_ALIGNMENT_IS_16
510 #elif defined(__linux__) || defined(__sun__) || defined(__CYGWIN__)
511  #define CRYPTOPP_MEMALIGN_AVAILABLE
512 #else
513  #define CRYPTOPP_NO_ALIGNED_ALLOC
514 #endif
515 
516 // Apple always provides 16-byte aligned, and tells us to use calloc
517 // http://developer.apple.com/library/mac/documentation/Performance/Conceptual/ManagingMemory/Articles/MemoryAlloc.html
518 
519 // how to disable inlining
520 #if defined(_MSC_VER) && _MSC_VER >= 1300
521 # define CRYPTOPP_NOINLINE_DOTDOTDOT
522 # define CRYPTOPP_NOINLINE __declspec(noinline)
523 #elif defined(__GNUC__)
524 # define CRYPTOPP_NOINLINE_DOTDOTDOT
525 # define CRYPTOPP_NOINLINE __attribute__((noinline))
526 #else
527 # define CRYPTOPP_NOINLINE_DOTDOTDOT ...
528 # define CRYPTOPP_NOINLINE
529 #endif
530 
531 // how to declare class constants
532 #if (defined(_MSC_VER) && _MSC_VER <= 1300) || defined(__INTEL_COMPILER) || defined(__BORLANDC__)
533 # define CRYPTOPP_CONSTANT(x) enum {x};
534 #else
535 # define CRYPTOPP_CONSTANT(x) static const int x;
536 #endif
537 
538 // Linux provides X32, which is 32-bit integers, longs and pointers on x86_64 using the full x86_64 register set.
539 // Detect via __ILP32__ (http://wiki.debian.org/X32Port). However, __ILP32__ shows up in more places than
540 // the System V ABI specs calls out, like on just about any 32-bit system with Clang.
541 #if ((__ILP32__ >= 1) || (_ILP32 >= 1)) && defined(__x86_64__)
542  #define CRYPTOPP_BOOL_X32 1
543 #else
544  #define CRYPTOPP_BOOL_X32 0
545 #endif
546 
547 // see http://predef.sourceforge.net/prearch.html
548 #if (defined(_M_IX86) || defined(__i386__) || defined(__i386) || defined(_X86_) || defined(__I86__) || defined(__INTEL__)) && !CRYPTOPP_BOOL_X32
549  #define CRYPTOPP_BOOL_X86 1
550 #else
551  #define CRYPTOPP_BOOL_X86 0
552 #endif
553 
554 #if (defined(_M_X64) || defined(__x86_64__)) && !CRYPTOPP_BOOL_X32
555  #define CRYPTOPP_BOOL_X64 1
556 #else
557  #define CRYPTOPP_BOOL_X64 0
558 #endif
559 
560 // Undo the ASM and Intrinsic related defines due to X32.
561 #if CRYPTOPP_BOOL_X32
562 # undef CRYPTOPP_BOOL_X64
563 # undef CRYPTOPP_X64_ASM_AVAILABLE
564 # undef CRYPTOPP_X64_MASM_AVAILABLE
565 #endif
566 
567 #if defined(__arm__) || defined(__aarch32__) || defined(_M_ARM)
568  #define CRYPTOPP_BOOL_ARM32 1
569 #else
570  #define CRYPTOPP_BOOL_ARM32 0
571 #endif
572 
573 // Microsoft plans to support ARM-64, but its not clear how to detect it.
574 // TODO: Add MSC_VER and ARM-64 platform define when available
575 #if defined(__arm64__) || defined(__aarch64__) || defined(_M_ARM64)
576  #define CRYPTOPP_BOOL_ARM64 1
577 #else
578  #define CRYPTOPP_BOOL_ARM64 0
579 #endif
580 
581 #if !defined(CRYPTOPP_NO_UNALIGNED_DATA_ACCESS) && !defined(CRYPTOPP_ALLOW_UNALIGNED_DATA_ACCESS)
582 #if (CRYPTOPP_BOOL_X64 || CRYPTOPP_BOOL_X86 || CRYPTOPP_BOOL_X32 || defined(__powerpc__) || (__ARM_FEATURE_UNALIGNED >= 1))
583  #define CRYPTOPP_ALLOW_UNALIGNED_DATA_ACCESS
584 #endif
585 #endif
586 
587 // ***************** determine availability of OS features ********************
588 
589 #ifndef NO_OS_DEPENDENCE
590 
591 #if defined(_WIN32) || defined(__CYGWIN__)
592 #define CRYPTOPP_WIN32_AVAILABLE
593 #endif
594 
595 #if defined(__unix__) || defined(__MACH__) || defined(__NetBSD__) || defined(__sun)
596 #define CRYPTOPP_UNIX_AVAILABLE
597 #endif
598 
599 #if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__)
600 #define CRYPTOPP_BSD_AVAILABLE
601 #endif
602 
603 #if defined(CRYPTOPP_WIN32_AVAILABLE) || defined(CRYPTOPP_UNIX_AVAILABLE)
604 # define HIGHRES_TIMER_AVAILABLE
605 #endif
606 
607 #ifdef CRYPTOPP_WIN32_AVAILABLE
608 # if !defined(WINAPI_FAMILY)
609 # define THREAD_TIMER_AVAILABLE
610 # elif defined(WINAPI_FAMILY)
611 # if (WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP))
612 # define THREAD_TIMER_AVAILABLE
613 # endif
614 # endif
615 #endif
616 
617 #ifdef CRYPTOPP_UNIX_AVAILABLE
618 # define HAS_BERKELEY_STYLE_SOCKETS
619 # define SOCKETS_AVAILABLE
620 #endif
621 
622 // Sockets are only available under Windows Runtime desktop partition apps (despite the MSDN literature)
623 #ifdef CRYPTOPP_WIN32_AVAILABLE
624 # define HAS_WINDOWS_STYLE_SOCKETS
625 # if !defined(WINAPI_FAMILY)
626 # define SOCKETS_AVAILABLE
627 # elif defined(WINAPI_FAMILY)
628 # if (WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP))
629 # define SOCKETS_AVAILABLE
630 # endif
631 # endif
632 #endif
633 
634 #if defined(HAS_WINDOWS_STYLE_SOCKETS) && (!defined(HAS_BERKELEY_STYLE_SOCKETS) || defined(PREFER_WINDOWS_STYLE_SOCKETS))
635 # define USE_WINDOWS_STYLE_SOCKETS
636 #else
637 # define USE_BERKELEY_STYLE_SOCKETS
638 #endif
639 
640 #if defined(CRYPTOPP_WIN32_AVAILABLE) && defined(SOCKETS_AVAILABLE) && !defined(USE_BERKELEY_STYLE_SOCKETS)
641 # define WINDOWS_PIPES_AVAILABLE
642 #endif
643 
644 #if defined(CRYPTOPP_UNIX_AVAILABLE) || defined(CRYPTOPP_DOXYGEN_PROCESSING)
645 # define NONBLOCKING_RNG_AVAILABLE
646 # define BLOCKING_RNG_AVAILABLE
647 # define OS_RNG_AVAILABLE
648 # define HAS_PTHREADS
649 # define THREADS_AVAILABLE
650 #endif
651 
652 #ifdef CRYPTOPP_WIN32_AVAILABLE
653 # if !defined(WINAPI_FAMILY)
654 # define HAS_WINTHREADS
655 # define THREADS_AVAILABLE
656 # define NONBLOCKING_RNG_AVAILABLE
657 # define OS_RNG_AVAILABLE
658 # elif defined(WINAPI_FAMILY)
659 # if (WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP))
660 # define HAS_WINTHREADS
661 # define THREADS_AVAILABLE
662 # define NONBLOCKING_RNG_AVAILABLE
663 # define OS_RNG_AVAILABLE
664 # elif !(WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP))
665 # if ((WINVER >= 0x0A00 /*_WIN32_WINNT_WIN10*/) || (_WIN32_WINNT >= 0x0A00 /*_WIN32_WINNT_WIN10*/))
666 # define NONBLOCKING_RNG_AVAILABLE
667 # define OS_RNG_AVAILABLE
668 # endif
669 # endif
670 # endif
671 #endif
672 
673 #endif // NO_OS_DEPENDENCE
674 
675 // ***************** DLL related ********************
676 
677 #if defined(CRYPTOPP_WIN32_AVAILABLE) && !defined(CRYPTOPP_DOXYGEN_PROCESSING)
678 
679 #ifdef CRYPTOPP_EXPORTS
680 #define CRYPTOPP_IS_DLL
681 #define CRYPTOPP_DLL __declspec(dllexport)
682 #elif defined(CRYPTOPP_IMPORTS)
683 #define CRYPTOPP_IS_DLL
684 #define CRYPTOPP_DLL __declspec(dllimport)
685 #else
686 #define CRYPTOPP_DLL
687 #endif
688 
689 #define CRYPTOPP_API __cdecl
690 
691 #else // not CRYPTOPP_WIN32_AVAILABLE
692 
693 #define CRYPTOPP_DLL
694 #define CRYPTOPP_API
695 
696 #endif // CRYPTOPP_WIN32_AVAILABLE
697 
698 #if defined(__MWERKS__)
699 #define CRYPTOPP_EXTERN_DLL_TEMPLATE_CLASS extern class CRYPTOPP_DLL
700 #elif defined(__BORLANDC__) || defined(__SUNPRO_CC)
701 #define CRYPTOPP_EXTERN_DLL_TEMPLATE_CLASS template class CRYPTOPP_DLL
702 #else
703 #define CRYPTOPP_EXTERN_DLL_TEMPLATE_CLASS extern template class CRYPTOPP_DLL
704 #endif
705 
706 #if defined(CRYPTOPP_MANUALLY_INSTANTIATE_TEMPLATES) && !defined(CRYPTOPP_IMPORTS)
707 #define CRYPTOPP_DLL_TEMPLATE_CLASS template class CRYPTOPP_DLL
708 #else
709 #define CRYPTOPP_DLL_TEMPLATE_CLASS CRYPTOPP_EXTERN_DLL_TEMPLATE_CLASS
710 #endif
711 
712 #if defined(__MWERKS__)
713 #define CRYPTOPP_EXTERN_STATIC_TEMPLATE_CLASS extern class
714 #elif defined(__BORLANDC__) || defined(__SUNPRO_CC)
715 #define CRYPTOPP_EXTERN_STATIC_TEMPLATE_CLASS template class
716 #else
717 #define CRYPTOPP_EXTERN_STATIC_TEMPLATE_CLASS extern template class
718 #endif
719 
720 #if defined(CRYPTOPP_MANUALLY_INSTANTIATE_TEMPLATES) && !defined(CRYPTOPP_EXPORTS)
721 #define CRYPTOPP_STATIC_TEMPLATE_CLASS template class
722 #else
723 #define CRYPTOPP_STATIC_TEMPLATE_CLASS CRYPTOPP_EXTERN_STATIC_TEMPLATE_CLASS
724 #endif
725 
726 // ************** Unused variable ***************
727 
728 // Portable way to suppress warnings.
729 // Moved from misc.h due to circular depenedencies.
730 #define CRYPTOPP_UNUSED(x) ((void)x)
731 
732 // ************** Deprecated ***************
733 
734 #if (CRYPTOPP_GCC_VERSION >= 40500) || (CRYPTOPP_LLVM_CLANG_VERSION >= 20800)
735 # define CRYPTOPP_DEPRECATED(msg) __attribute__((deprecated (msg)));
736 #elif (CRYPTOPP_GCC_VERSION)
737 # define CRYPTOPP_DEPRECATED(msg) __attribute__((deprecated));
738 #else
739 # define CRYPTOPP_DEPRECATED(msg)
740 #endif
741 
742 // ***************** C++11 related ********************
743 
744 // Visual Studio began at VS2010, http://msdn.microsoft.com/en-us/library/hh567368%28v=vs.110%29.aspx.
745 // Intel and C++11 language features, http://software.intel.com/en-us/articles/c0x-features-supported-by-intel-c-compiler
746 // GCC and C++11 language features, http://gcc.gnu.org/projects/cxx0x.html
747 // Clang and C++11 language features, http://clang.llvm.org/cxx_status.html
748 #if (_MSC_VER >= 1600) || (__cplusplus >= 201103L)
749 # define CRYPTOPP_CXX11 1
750 #endif
751 
752 // Hack ahead. Apple's standard library does not have C++'s unique_ptr in C++11. We can't
753 // test for unique_ptr directly because some of the non-Apple Clangs on OS X fail the same
754 // way. However, modern standard libraries have <forward_list>, so we test for it instead.
755 // Thanks to Jonathan Wakely for devising the clever test for modern/ancient versions.
756 // TODO: test under Xcode 3, where g++ is really g++.
757 #if defined(__APPLE__) && defined(__clang__)
758 # if !(defined(__has_include) && __has_include(<forward_list>))
759 # undef CRYPTOPP_CXX11
760 # endif
761 #endif
762 
763 // C++11 or C++14 is available
764 #if defined(CRYPTOPP_CXX11)
765 
766 // atomics: MS at VS2012 (17.00); GCC at 4.4; Clang at 3.1/3.2; Intel 13.0; SunCC 12.5.
767 #if (CRYPTOPP_MSC_VERSION >= 1700)
768 # define CRYPTOPP_CXX11_ATOMICS 1
769 #elif defined(__INTEL_COMPILER) && (__INTEL_COMPILER >= 1300)
770 # define CRYPTOPP_CXX11_ATOMICS 1
771 #elif defined(__clang__)
772 # if __has_feature(cxx_atomic)
773 # define CRYPTOPP_CXX11_ATOMICS 1
774 # endif
775 #elif (CRYPTOPP_GCC_VERSION >= 40400)
776 # define CRYPTOPP_CXX11_ATOMICS 1
777 #elif (__SUNPRO_CC >= 0x5140)
778 # define CRYPTOPP_CXX11_ATOMICS 1
779 #endif // atomics
780 
781 // synchronization: MS at VS2012 (17.00); GCC at 4.4; Clang at 3.3; Xcode 5.0; Intel 12.0; SunCC 12.4.
782 // TODO: verify Clang and Intel versions; find __has_feature(x) extension for Clang
783 #if (CRYPTOPP_MSC_VERSION >= 1700)
784 # define CRYPTOPP_CXX11_SYNCHRONIZATION 1
785 #elif defined(__INTEL_COMPILER) && (__INTEL_COMPILER >= 1200)
786 # define CRYPTOPP_CXX11_SYNCHRONIZATION 1
787 #elif (CRYPTOPP_LLVM_CLANG_VERSION >= 30300) || (CRYPTOPP_APPLE_CLANG_VERSION >= 50000)
788 # define CRYPTOPP_CXX11_SYNCHRONIZATION 1
789 #elif (CRYPTOPP_GCC_VERSION >= 40400)
790 # define CRYPTOPP_CXX11_SYNCHRONIZATION 1
791 #elif (__SUNPRO_CC >= 0x5130)
792 # define CRYPTOPP_CXX11_SYNCHRONIZATION 1
793 #endif // synchronization
794 
795 // alignof/alignas: MS at VS2015 (19.00); GCC at 4.8; Clang at 3.3; Intel 15.0; SunCC 12.4.
796 #if (CRYPTOPP_MSC_VERSION >= 1900)
797 # define CRYPTOPP_CXX11_ALIGNAS 1
798 # define CRYPTOPP_CXX11_ALIGNOF 1
799 #elif defined(__INTEL_COMPILER) && (__INTEL_COMPILER >= 1500)
800 # define CRYPTOPP_CXX11_ALIGNAS 1
801 # define CRYPTOPP_CXX11_ALIGNOF 1
802 #elif defined(__clang__)
803 # if __has_feature(cxx_alignas)
804 # define CRYPTOPP_CXX11_ALIGNAS 1
805 # endif
806 # if __has_feature(cxx_alignof)
807 # define CRYPTOPP_CXX11_ALIGNOF 1
808 # endif
809 #elif (CRYPTOPP_GCC_VERSION >= 40800)
810 # define CRYPTOPP_CXX11_ALIGNAS 1
811 # define CRYPTOPP_CXX11_ALIGNOF 1
812 #elif (__SUNPRO_CC >= 0x5130)
813 # define CRYPTOPP_CXX11_ALIGNAS 1
814 # define CRYPTOPP_CXX11_ALIGNOF 1
815 #endif // alignof/alignas
816 
817 // noexcept: MS at VS2015 (19.00); GCC at 4.6; Clang at 3.0; Intel 14.0; SunCC 12.4.
818 #if (CRYPTOPP_MSC_VERSION >= 1900)
819 # define CRYPTOPP_CXX11_NOEXCEPT 1
820 #elif defined(__INTEL_COMPILER) && (__INTEL_COMPILER >= 1400)
821 # define CRYPTOPP_CXX11_NOEXCEPT 1
822 #elif defined(__clang__)
823 # if __has_feature(cxx_noexcept)
824 # define CRYPTOPP_CXX11_NOEXCEPT 1
825 # endif
826 #elif (CRYPTOPP_GCC_VERSION >= 40600)
827 # define CRYPTOPP_CXX11_NOEXCEPT 1
828 #elif (__SUNPRO_CC >= 0x5130)
829 # define CRYPTOPP_CXX11_NOEXCEPT 1
830 #endif // noexcept compilers
831 
832 // variadic templates: MS at VS2013 (18.00); GCC at 4.3; Clang at 2.9; Intel 12.1; SunCC 12.4.
833 #if (CRYPTOPP_MSC_VERSION >= 1800)
834 # define CRYPTOPP_CXX11_VARIADIC_TEMPLATES 1
835 #elif defined(__INTEL_COMPILER) && (__INTEL_COMPILER >= 1210)
836 # define CRYPTOPP_CXX11_VARIADIC_TEMPLATES 1
837 #elif defined(__clang__)
838 # if __has_feature(cxx_variadic_templates)
839 # define CRYPTOPP_CXX11_VARIADIC_TEMPLATES 1
840 # endif
841 #elif (CRYPTOPP_GCC_VERSION >= 40300)
842 # define CRYPTOPP_CXX11_VARIADIC_TEMPLATES 1
843 #elif (__SUNPRO_CC >= 0x5130)
844 # define CRYPTOPP_CXX11_VARIADIC_TEMPLATES 1
845 #endif // variadic templates
846 
847 // TODO: Emplacement, R-values and Move semantics
848 // Needed because we are catching warnings with GCC and MSC
849 
850 #endif // CRYPTOPP_CXX11
851 
852 // Hack... CRYPTOPP_ALIGN_DATA is defined earlier, before C++11 alignas available
853 #if defined(CRYPTOPP_CXX11_ALIGNAS)
854 # undef CRYPTOPP_ALIGN_DATA
855 # define CRYPTOPP_ALIGN_DATA(x) alignas(x)
856 #endif // CRYPTOPP_CXX11_ALIGNAS
857 
858 #if defined(CRYPTOPP_CXX11_NOEXCEPT)
859 # define CRYPTOPP_THROW noexcept(false)
860 # define CRYPTOPP_NO_THROW noexcept(true)
861 #else
862 # define CRYPTOPP_THROW
863 # define CRYPTOPP_NO_THROW
864 #endif // CRYPTOPP_CXX11_NOEXCEPT
865 
866 // Hack... CRYPTOPP_ALIGN_DATA is defined earlier, before C++11 alignas availability is determined
867 #if defined(CRYPTOPP_CXX11_ALIGNAS)
868 # undef CRYPTOPP_ALIGN_DATA
869 # define CRYPTOPP_ALIGN_DATA(x) alignas(x)
870 #endif // CRYPTOPP_CXX11_ALIGNAS
871 
872 // OK to comment the following out, but please report it so we can fix it.
873 #if (defined(__cplusplus) && (__cplusplus >= 199711L)) && !defined(CRYPTOPP_UNCAUGHT_EXCEPTION_AVAILABLE)
874 # error "std::uncaught_exception is not available. This is likely a configuration error."
875 #endif
876 
877 #endif
Crypto++ library namespace.