diff options
author | weidai <weidai@57ff6487-cd31-0410-9ec3-f628ee90f5f0> | 2003-07-11 19:46:28 +0000 |
---|---|---|
committer | weidai <weidai@57ff6487-cd31-0410-9ec3-f628ee90f5f0> | 2003-07-11 19:46:28 +0000 |
commit | 016d97e9eca4a17fd96d575f7b570029848423f7 (patch) | |
tree | ad2be593c944d2acdd84b110074c0f9401b82aa1 /dll.cpp | |
parent | b4a86556710cc5933a2b67458f957eee2056fe18 (diff) | |
download | cryptopp-016d97e9eca4a17fd96d575f7b570029848423f7.tar.gz |
fix for Unix
git-svn-id: svn://svn.code.sf.net/p/cryptopp/code/trunk/c5@93 57ff6487-cd31-0410-9ec3-f628ee90f5f0
Diffstat (limited to 'dll.cpp')
-rw-r--r-- | dll.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -6,7 +6,9 @@ #include "dll.h" #pragma warning(default: 4660) +#ifdef CRYPTOPP_WIN32_AVAILABLE #include <windows.h> +#endif #include "iterhash.cpp" #include "strciphr.cpp" @@ -23,13 +25,19 @@ template<> const byte PKCS_DigestDecoration<SHA>::decoration[] = {0x30,0x21,0x30 template<> const unsigned int PKCS_DigestDecoration<SHA>::length = sizeof(PKCS_DigestDecoration<SHA>::decoration); static const byte s_moduleMac[CryptoPP::HMAC<CryptoPP::SHA1>::DIGESTSIZE] = "reserved for mac"; +#ifdef CRYPTOPP_WIN32_AVAILABLE static HMODULE s_hModule = NULL; +#endif void DoDllPowerUpSelfTest() { +#ifdef CRYPTOPP_WIN32_AVAILABLE char moduleFileName[MAX_PATH]; GetModuleFileNameA(s_hModule, moduleFileName, sizeof(moduleFileName)); CryptoPP::DoPowerUpSelfTest(moduleFileName, s_moduleMac); +#else + throw NotImplemented("DoDllPowerUpSelfTest() only available on Windows"); +#endif } NAMESPACE_END |