diff options
author | weidai <weidai@57ff6487-cd31-0410-9ec3-f628ee90f5f0> | 2003-07-04 00:17:37 +0000 |
---|---|---|
committer | weidai <weidai@57ff6487-cd31-0410-9ec3-f628ee90f5f0> | 2003-07-04 00:17:37 +0000 |
commit | 572fe07633123ce38abf28c6426356e37aef3a99 (patch) | |
tree | 0536d87e504a82920156c239bc5ae6aa43e70ebc /osrng.h | |
parent | 3e8c979ddc194e043567c036321e67c89f847362 (diff) | |
download | cryptopp-572fe07633123ce38abf28c6426356e37aef3a99.tar.gz |
create DLL version, fix GetNextIV() bug in CTR and OFB modes
git-svn-id: svn://svn.code.sf.net/p/cryptopp/code/trunk/c5@87 57ff6487-cd31-0410-9ec3-f628ee90f5f0
Diffstat (limited to 'osrng.h')
-rw-r--r-- | osrng.h | 17 |
1 files changed, 10 insertions, 7 deletions
@@ -7,11 +7,12 @@ #include "randpool.h" #include "rng.h" +#include "des.h" NAMESPACE_BEGIN(CryptoPP) //! Exception class for Operating-System Random Number Generator. -class OS_RNG_Err : public Exception +class CRYPTOPP_DLL OS_RNG_Err : public Exception { public: OS_RNG_Err(const std::string &operation); @@ -20,7 +21,7 @@ public: #ifdef NONBLOCKING_RNG_AVAILABLE #ifdef CRYPTOPP_WIN32_AVAILABLE -class MicrosoftCryptoProvider +class CRYPTOPP_DLL MicrosoftCryptoProvider { public: MicrosoftCryptoProvider(); @@ -37,7 +38,7 @@ private: #endif //! encapsulate CryptoAPI's CryptGenRandom or /dev/urandom -class NonblockingRng : public RandomNumberGenerator +class CRYPTOPP_DLL NonblockingRng : public RandomNumberGenerator { public: NonblockingRng(); @@ -60,7 +61,7 @@ protected: #ifdef BLOCKING_RNG_AVAILABLE //! encapsulate /dev/random -class BlockingRng : public RandomNumberGenerator +class CRYPTOPP_DLL BlockingRng : public RandomNumberGenerator { public: BlockingRng(); @@ -74,11 +75,11 @@ protected: #endif -void OS_GenerateRandomBlock(bool blocking, byte *output, unsigned int size); +CRYPTOPP_DLL void OS_GenerateRandomBlock(bool blocking, byte *output, unsigned int size); //! Automaticly Seeded Randomness Pool /*! This class seeds itself using an operating system provided RNG. */ -class AutoSeededRandomPool : public RandomPool +class CRYPTOPP_DLL AutoSeededRandomPool : public RandomPool { public: //! blocking will be ignored if the prefered RNG isn't available @@ -89,7 +90,7 @@ public: //! RNG from ANSI X9.17 Appendix C, seeded using an OS provided RNG template <class BLOCK_CIPHER> -class AutoSeededX917RNG : public RandomNumberGenerator +class AutoSeededX917RNG : public RandomNumberGenerator, public NotCopyable { public: //! blocking will be ignored if the prefered RNG isn't available @@ -108,6 +109,8 @@ private: unsigned int m_counter; }; +CRYPTOPP_DLL_TEMPLATE_CLASS AutoSeededX917RNG<DES_EDE3>; + template <class BLOCK_CIPHER> void AutoSeededX917RNG<BLOCK_CIPHER>::Reseed(const byte *key, unsigned int keylength, const byte *seed, unsigned long timeVector) { |