From f278895908e663a6a5a2c1f63e5523c5004f5d20 Mon Sep 17 00:00:00 2001 From: weidai Date: Fri, 4 Jul 2003 00:17:37 +0000 Subject: create DLL version, fix GetNextIV() bug in CTR and OFB modes --- dll.h | 64 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 64 insertions(+) create mode 100644 dll.h (limited to 'dll.h') diff --git a/dll.h b/dll.h new file mode 100644 index 00000000..a8b07d69 --- /dev/null +++ b/dll.h @@ -0,0 +1,64 @@ +#ifndef CRYPTOPP_DLL_H +#define CRYPTOPP_DLL_H + +#if !defined(CRYPTOPP_EXPORTS) && !defined(CRYPTOPP_IMPORTS) && !defined(CRYPTOPP_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 "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 "hex.h" +#include "hmac.h" +#include "modes.h" +#include "mqueue.h" +#include "nbtheory.h" +#include "osrng.h" +#include "pkcspad.h" +#include "randpool.h" +#include "rsa.h" +#include "sha.h" +#include "skipjack.h" +#include "trdlocal.h" + +#ifdef CRYPTOPP_IMPORTS + +#ifdef _DLL +// cause CRT DLL to be initialized before Crypto++ so that we can use malloc and free during DllMain() +#ifdef NDEBUG +#pragma comment(lib, "msvcrt") +#else +#pragma comment(lib, "msvcrtd") +#endif +#endif + +#pragma comment(lib, "cryptopp") + +#endif // #ifdef CRYPTOPP_IMPORTS + +#include // for _PNH + +NAMESPACE_BEGIN(CryptoPP) + +typedef void * (_cdecl * PNew)(size_t); +typedef void (_cdecl * PDelete)(void *); +typedef void (_cdecl * PGetNewAndDelete)(PNew &, PDelete &); +typedef _PNH (_cdecl * PSetNewHandler)(_PNH); +typedef void (_cdecl * PSetNewAndDelete)(PNew, PDelete, PSetNewHandler); + +CRYPTOPP_DLL void DoDllPowerUpSelfTest(); + +NAMESPACE_END + +#endif -- cgit v1.2.1