summaryrefslogtreecommitdiff
path: root/osrng.h
diff options
context:
space:
mode:
authorweidai <weidai@57ff6487-cd31-0410-9ec3-f628ee90f5f0>2005-01-20 04:19:35 +0000
committerweidai <weidai@57ff6487-cd31-0410-9ec3-f628ee90f5f0>2005-01-20 04:19:35 +0000
commit242d67fb17619670d9b757c442dcf2e26d8478a1 (patch)
tree1f61e8bf59450a028415e5a3f08565a6ceb86afe /osrng.h
parent4b85e6cac0d84aaf65d0695adb137ae956e4e241 (diff)
downloadcryptopp-242d67fb17619670d9b757c442dcf2e26d8478a1.tar.gz
changes done for FIPS-140 lab code drop
git-svn-id: svn://svn.code.sf.net/p/cryptopp/code/trunk/c5@195 57ff6487-cd31-0410-9ec3-f628ee90f5f0
Diffstat (limited to 'osrng.h')
-rw-r--r--osrng.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/osrng.h b/osrng.h
index 0e2db3c..a8941fc 100644
--- a/osrng.h
+++ b/osrng.h
@@ -78,7 +78,7 @@ protected:
#endif
-CRYPTOPP_DLL void OS_GenerateRandomBlock(bool blocking, byte *output, unsigned int size);
+CRYPTOPP_DLL void CRYPTOPP_API OS_GenerateRandomBlock(bool blocking, byte *output, unsigned int size);
//! Automaticly Seeded Randomness Pool
/*! This class seeds itself using an operating system provided RNG. */
@@ -101,7 +101,7 @@ public:
{Reseed(blocking);}
void Reseed(bool blocking = false);
// exposed for testing
- void Reseed(const byte *key, unsigned int keylength, const byte *seed, unsigned long timeVector);
+ void Reseed(const byte *key, unsigned int keylength, const byte *seed, const byte *timeVector);
byte GenerateByte();
@@ -115,7 +115,7 @@ private:
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)
+void AutoSeededX917RNG<BLOCK_CIPHER>::Reseed(const byte *key, unsigned int keylength, const byte *seed, const byte *timeVector)
{
m_rng.reset(new X917RNG(new typename BLOCK_CIPHER::Encryption(key, keylength), seed, timeVector));
@@ -138,7 +138,7 @@ void AutoSeededX917RNG<BLOCK_CIPHER>::Reseed(bool blocking)
} // check that seed and key don't have same value
while (memcmp(key, seed, STDMIN((unsigned int)BLOCK_CIPHER::BLOCKSIZE, (unsigned int)BLOCK_CIPHER::DEFAULT_KEYLENGTH)) == 0);
- Reseed(key, BLOCK_CIPHER::DEFAULT_KEYLENGTH, seed, 0);
+ Reseed(key, BLOCK_CIPHER::DEFAULT_KEYLENGTH, seed, NULL);
}
template <class BLOCK_CIPHER>