summaryrefslogtreecommitdiff
path: root/randpool.h
diff options
context:
space:
mode:
authorJeffrey Walton <noloader@gmail.com>2015-11-05 01:59:46 -0500
committerJeffrey Walton <noloader@gmail.com>2015-11-05 01:59:46 -0500
commit48809d4e85c125814425c621d8d0d89f95405924 (patch)
tree1010fd16c4b1199f3d27dd726dda241a2bd29f83 /randpool.h
parent025337a94aceb75d188149db70c2094673772816 (diff)
downloadcryptopp-git-48809d4e85c125814425c621d8d0d89f95405924.tar.gz
CRYPTOPP 5.6.3 RC6 checkin
Diffstat (limited to 'randpool.h')
-rw-r--r--randpool.h69
1 files changed, 36 insertions, 33 deletions
diff --git a/randpool.h b/randpool.h
index c25bc9bb..aed38f0f 100644
--- a/randpool.h
+++ b/randpool.h
@@ -1,33 +1,36 @@
-#ifndef CRYPTOPP_RANDPOOL_H
-#define CRYPTOPP_RANDPOOL_H
-
-#include "cryptlib.h"
-#include "filters.h"
-
-NAMESPACE_BEGIN(CryptoPP)
-
-//! Randomness Pool
-/*! This class can be used to generate cryptographic quality
- pseudorandom bytes after seeding the pool with IncorporateEntropy() */
-class CRYPTOPP_DLL RandomPool : public RandomNumberGenerator, public NotCopyable
-{
-public:
- RandomPool();
-
- bool CanIncorporateEntropy() const {return true;}
- void IncorporateEntropy(const byte *input, size_t length);
- void GenerateIntoBufferedTransformation(BufferedTransformation &target, const std::string &channel, lword size);
-
- // for backwards compatibility. use RandomNumberSource, RandomNumberStore, and RandomNumberSink for other BufferTransformation functionality
- void Put(const byte *input, size_t length) {IncorporateEntropy(input, length);}
-
-private:
- FixedSizeSecBlock<byte, 32> m_key;
- FixedSizeSecBlock<byte, 16> m_seed;
- member_ptr<BlockCipher> m_pCipher;
- bool m_keySet;
-};
-
-NAMESPACE_END
-
-#endif
+#ifndef CRYPTOPP_RANDPOOL_H
+#define CRYPTOPP_RANDPOOL_H
+
+#include "cryptlib.h"
+#include "filters.h"
+#include "secblock.h"
+#include "smartptr.h"
+#include "aes.h"
+
+NAMESPACE_BEGIN(CryptoPP)
+
+//! Randomness Pool
+/*! This class can be used to generate cryptographic quality
+ pseudorandom bytes after seeding the pool with IncorporateEntropy() */
+class CRYPTOPP_DLL RandomPool : public RandomNumberGenerator, public NotCopyable
+{
+public:
+ RandomPool();
+
+ bool CanIncorporateEntropy() const {return true;}
+ void IncorporateEntropy(const byte *input, size_t length);
+ void GenerateIntoBufferedTransformation(BufferedTransformation &target, const std::string &channel, lword size);
+
+ // for backwards compatibility. use RandomNumberSource, RandomNumberStore, and RandomNumberSink for other BufferTransformation functionality
+ void Put(const byte *input, size_t length) {IncorporateEntropy(input, length);}
+
+private:
+ FixedSizeSecBlock<byte, 32> m_key;
+ FixedSizeSecBlock<byte, 16> m_seed;
+ member_ptr<BlockCipher> m_pCipher;
+ bool m_keySet;
+};
+
+NAMESPACE_END
+
+#endif