00001 #ifndef CRYPTOPP_RANDPOOL_H
00002 #define CRYPTOPP_RANDPOOL_H
00003
00004 #include "cryptlib.h"
00005 #include "filters.h"
00006
00007 NAMESPACE_BEGIN(CryptoPP)
00008
00010
00013 class RandomPool : public RandomNumberGenerator,
00014 public Sink
00015 {
00016 public:
00018 RandomPool(unsigned int poolSize=384);
00019
00021 void Put(byte inByte);
00023 void Put(const byte *inString, unsigned int length);
00024
00025 byte GenerateByte();
00026 void GenerateBlock(byte *output, unsigned int size);
00027
00028 protected:
00029 void Stir();
00030
00031 private:
00032 SecByteBlock pool, key;
00033 unsigned int addPos, getPos;
00034 };
00035
00036 NAMESPACE_END
00037
00038 #endif