Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:54:55

0001 // config_ns.h - written and placed in public domain by Jeffrey Walton

0002 //               the bits that make up this source file are from the

0003 //               library's monolithic config.h.

0004 
0005 /// \file config_ns.h

0006 /// \brief Library configuration file

0007 /// \details <tt>config_ns.h</tt> provides defines for C++ and library

0008 ///  namespaces.

0009 /// \details <tt>config.h</tt> was split into components in May 2019 to better

0010 ///  integrate with Autoconf and its feature tests. The splitting occurred so

0011 ///  users could continue to include <tt>config.h</tt> while allowing Autoconf

0012 ///  to write new <tt>config_asm.h</tt> and new <tt>config_cxx.h</tt> using

0013 ///  its feature tests.

0014 /// \note You should include <tt>config.h</tt> rather than <tt>config_ns.h</tt>

0015 ///  directly.

0016 /// \sa <A HREF="https://github.com/weidai11/cryptopp/issues/835">Issue 835,

0017 ///  Make config.h more autoconf friendly</A>,

0018 ///  <A HREF="https://www.cryptopp.com/wiki/Configure.sh">Configure.sh script</A>

0019 ///  on the Crypto++ wiki

0020 /// \since Crypto++ 8.3

0021 
0022 #ifndef CRYPTOPP_CONFIG_NAMESPACE_H
0023 #define CRYPTOPP_CONFIG_NAMESPACE_H
0024 
0025 // namespace support is now required

0026 #ifdef NO_NAMESPACE
0027 # error namespace support is now required
0028 #endif
0029 
0030 #ifdef CRYPTOPP_DOXYGEN_PROCESSING
0031 
0032 /// \namespace CryptoPP

0033 /// \brief Crypto++ library namespace

0034 /// \details Nearly all classes are located in the CryptoPP namespace. Within

0035 ///  the namespace, there are four additional namespaces.

0036 ///   <ul>

0037 ///     <li>Name - namespace for names used with NameValuePairs and documented

0038 ///         in argnames.h

0039 ///     <li>NaCl - namespace for NaCl test functions like crypto_box,

0040 ///         crypto_box_open, crypto_sign, and crypto_sign_open

0041 ///     <li>Donna - namespace for curve25519 library operations. The name was

0042 ///         selected due to use of Langley and Moon's curve25519-donna.

0043 ///     <li>Test - namespace for testing and benchmarks classes

0044 ///     <li>Weak - namespace for weak and wounded algorithms, like ARC4, MD5

0045 ///         and Pananma

0046 ///   </ul>

0047 /// \since Crypto++ 3.0

0048 namespace CryptoPP { }
0049 
0050 // Bring in the symbols found in the weak namespace; and fold Weak1 into Weak

0051 #define CRYPTOPP_ENABLE_NAMESPACE_WEAK 1
0052 #define Weak1 Weak
0053 // Avoid putting "CryptoPP::" in front of everything in Doxygen output

0054 #define CryptoPP
0055 #define NAMESPACE_BEGIN(x)
0056 #define NAMESPACE_END
0057 // Get Doxygen to generate better documentation for these typedefs

0058 #define DOCUMENTED_TYPEDEF(x, y) class y : public x {}
0059 // Make "protected" "private" so the functions and members are not documented

0060 #define protected private
0061 
0062 #else
0063 // Not Doxygen

0064 #define NAMESPACE_BEGIN(x) namespace x {
0065 #define NAMESPACE_END }
0066 #define DOCUMENTED_TYPEDEF(x, y) typedef x y
0067 
0068 #endif  // CRYPTOPP_DOXYGEN_PROCESSING

0069 
0070 #define ANONYMOUS_NAMESPACE_BEGIN namespace {
0071 #define ANONYMOUS_NAMESPACE_END }
0072 #define USING_NAMESPACE(x) using namespace x;
0073 #define DOCUMENTED_NAMESPACE_BEGIN(x) namespace x {
0074 #define DOCUMENTED_NAMESPACE_END }
0075 
0076 #endif  // CRYPTOPP_CONFIG_NAMESPACE_H