Crypto++  8.3
Free C++ class library of cryptographic schemes
config_ns.h
Go to the documentation of this file.
1 // config_ns.h - written and placed in public domain by Jeffrey Walton
2 // the bits that make up this source file are from the
3 // library's monolithic config.h.
4 
5 /// \file config_ns.h
6 /// \brief Library configuration file
7 /// \details <tt>config.h</tt> was split into components in May 2019 to better
8 /// integrate with Autoconf and its feature tests. The splitting occurred so
9 /// users could continue to include <tt>config.h</tt> while allowing Autoconf
10 /// to write new <tt>config_asm.h</tt> and new <tt>config_cxx.h</tt> using
11 /// its feature tests.
12 /// \sa <A HREF="https://github.com/weidai11/cryptopp/issues/835">Issue 835</A>
13 /// \since Crypto++ 8.3
14 
15 #ifndef CRYPTOPP_CONFIG_NAMESPACE_H
16 #define CRYPTOPP_CONFIG_NAMESPACE_H
17 
18 // namespace support is now required
19 #ifdef NO_NAMESPACE
20 # error namespace support is now required
21 #endif
22 
23 #ifdef CRYPTOPP_DOXYGEN_PROCESSING
24 
25 /// \namespace CryptoPP
26 /// \brief Crypto++ library namespace
27 /// \details Nearly all classes are located in the CryptoPP namespace. Within
28 /// the namespace, there are four additional namespaces.
29 /// <ul>
30 /// <li>Name - namespace for names used with NameValuePairs and documented
31 /// in argnames.h
32 /// <li>NaCl - namespace for NaCl test functions like crypto_box,
33 /// crypto_box_open, crypto_sign, and crypto_sign_open
34 /// <li>Donna - namespace for curve25519 library operations. The name was
35 /// selected due to use of Langley and Moon's curve25519-donna.
36 /// <li>Test - namespace for testing and benchmarks classes
37 /// <li>Weak - namespace for weak and wounded algorithms, like ARC4, MD5
38 /// and Pananma
39 /// </ul>
40 /// \since Crypto++ 3.0
41 namespace CryptoPP { }
42 
43 // Bring in the symbols found in the weak namespace; and fold Weak1 into Weak
44 #define CRYPTOPP_ENABLE_NAMESPACE_WEAK 1
45 #define Weak1 Weak
46 // Avoid putting "CryptoPP::" in front of everything in Doxygen output
47 #define CryptoPP
48 #define NAMESPACE_BEGIN(x)
49 #define NAMESPACE_END
50 // Get Doxygen to generate better documentation for these typedefs
51 #define DOCUMENTED_TYPEDEF(x, y) class y : public x {}
52 // Make "protected" "private" so the functions and members are not documented
53 #define protected private
54 
55 #else
56 // Not Doxygen
57 #define NAMESPACE_BEGIN(x) namespace x {
58 #define NAMESPACE_END }
59 #define DOCUMENTED_TYPEDEF(x, y) typedef x y
60 
61 #endif // CRYPTOPP_DOXYGEN_PROCESSING
62 
63 #define ANONYMOUS_NAMESPACE_BEGIN namespace {
64 #define ANONYMOUS_NAMESPACE_END }
65 #define USING_NAMESPACE(x) using namespace x;
66 #define DOCUMENTED_NAMESPACE_BEGIN(x) namespace x {
67 #define DOCUMENTED_NAMESPACE_END }
68 
69 #endif // CRYPTOPP_CONFIG_NAMESPACE_H
CryptoPP
Crypto++ library namespace.