2017-01-27 12:05:45 +00:00
|
|
|
// dll.h - originally written and placed in the public domain by Wei Dai
|
2015-11-18 20:32:28 +00:00
|
|
|
|
2018-01-22 14:53:49 +00:00
|
|
|
/// \file dll.h
|
2017-11-29 15:54:33 +00:00
|
|
|
/// \brief Functions and definitions required for building the FIPS-140 DLL on Windows
|
2015-11-18 20:32:28 +00:00
|
|
|
|
2015-11-05 06:59:46 +00:00
|
|
|
#ifndef CRYPTOPP_DLL_H
|
|
|
|
#define CRYPTOPP_DLL_H
|
|
|
|
|
|
|
|
#if !defined(CRYPTOPP_IMPORTS) && !defined(CRYPTOPP_EXPORTS) && !defined(CRYPTOPP_DEFAULT_NO_DLL)
|
|
|
|
#ifdef CRYPTOPP_CONFIG_H
|
|
|
|
#error To use the DLL version of Crypto++, this file must be included before any other Crypto++ header files.
|
|
|
|
#endif
|
|
|
|
#define CRYPTOPP_IMPORTS
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#include "aes.h"
|
|
|
|
#include "cbcmac.h"
|
|
|
|
#include "ccm.h"
|
|
|
|
#include "cmac.h"
|
|
|
|
#include "channels.h"
|
|
|
|
#include "des.h"
|
|
|
|
#include "dh.h"
|
|
|
|
#include "dsa.h"
|
|
|
|
#include "ec2n.h"
|
|
|
|
#include "eccrypto.h"
|
|
|
|
#include "ecp.h"
|
|
|
|
#include "files.h"
|
|
|
|
#include "fips140.h"
|
|
|
|
#include "gcm.h"
|
|
|
|
#include "hex.h"
|
|
|
|
#include "hmac.h"
|
|
|
|
#include "modes.h"
|
|
|
|
#include "mqueue.h"
|
|
|
|
#include "nbtheory.h"
|
|
|
|
#include "osrng.h"
|
|
|
|
#include "pkcspad.h"
|
|
|
|
#include "pssr.h"
|
|
|
|
#include "randpool.h"
|
|
|
|
#include "rsa.h"
|
|
|
|
#include "rw.h"
|
|
|
|
#include "sha.h"
|
|
|
|
#include "skipjack.h"
|
|
|
|
|
|
|
|
#ifdef CRYPTOPP_IMPORTS
|
|
|
|
|
|
|
|
#ifdef _DLL
|
|
|
|
// cause CRT DLL to be initialized before Crypto++ so that we can use malloc and free during DllMain()
|
2016-09-17 18:40:23 +00:00
|
|
|
#ifdef CRYPTOPP_DEBUG
|
|
|
|
# pragma comment(lib, "msvcrtd")
|
|
|
|
# pragma comment(lib, "cryptopp")
|
2015-11-05 06:59:46 +00:00
|
|
|
#else
|
2016-09-17 18:40:23 +00:00
|
|
|
# pragma comment(lib, "msvcrt")
|
|
|
|
# pragma comment(lib, "cryptopp")
|
2015-11-05 06:59:46 +00:00
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif // #ifdef CRYPTOPP_IMPORTS
|
|
|
|
|
|
|
|
#include <new> // for new_handler
|
|
|
|
|
|
|
|
NAMESPACE_BEGIN(CryptoPP)
|
|
|
|
|
|
|
|
typedef void * (CRYPTOPP_API * PNew)(size_t);
|
|
|
|
typedef void (CRYPTOPP_API * PDelete)(void *);
|
|
|
|
typedef void (CRYPTOPP_API * PGetNewAndDelete)(PNew &, PDelete &);
|
2016-12-03 10:05:56 +00:00
|
|
|
typedef std::new_handler (CRYPTOPP_API * PSetNewHandler)(std::new_handler);
|
2015-11-05 06:59:46 +00:00
|
|
|
typedef void (CRYPTOPP_API * PSetNewAndDelete)(PNew, PDelete, PSetNewHandler);
|
|
|
|
|
|
|
|
NAMESPACE_END
|
|
|
|
|
|
|
|
#endif
|