Fabcoin Core  0.16.2
P2P Digital Currency
randpool.h
Go to the documentation of this file.
1 // randpool.h - written and placed in the public domain by Wei Dai
2 
27 
28 #ifndef CRYPTOPP_RANDPOOL_H
29 #define CRYPTOPP_RANDPOOL_H
30 
31 #include "cryptlib.h"
32 #include "filters.h"
33 #include "secblock.h"
34 #include "smartptr.h"
35 #include "aes.h"
36 
38 
50 {
51 public:
53  RandomPool();
54 
55  bool CanIncorporateEntropy() const {return true;}
56  void IncorporateEntropy(const byte *input, size_t length);
57  void GenerateIntoBufferedTransformation(BufferedTransformation &target, const std::string &channel, lword size);
58 
59  // for backwards compatibility. use RandomNumberSource, RandomNumberStore, and RandomNumberSink for other BufferTransformation functionality
60  void Put(const byte *input, size_t length) {IncorporateEntropy(input, length);}
61 
62 private:
66  bool m_keySet;
67 };
68 
70 
71 #endif
void Put(const byte *input, size_t length)
Definition: randpool.h:60
Randomness Pool based on AES-256.
Definition: randpool.h:49
uint8_t byte
Definition: Common.h:57
bool CanIncorporateEntropy() const
Determines if a generator can accept additional entropy.
Definition: randpool.h:55
#define NAMESPACE_BEGIN(x)
Definition: config.h:200
Abstract base classes that provide a uniform interface to this library.
Classes for automatic resource management.
Interface for random number generators.
Definition: cryptlib.h:1188
Interface for buffered transformations.
Definition: cryptlib.h:1352
FixedSizeAlignedSecBlock< byte, 32 > m_key
Definition: randpool.h:64
Classes and functions for secure memory allocations.
Class file for the AES cipher (Rijndael)
FixedSizeAlignedSecBlock< byte, 16, true > m_seed
Definition: randpool.h:63
Implementation of BufferedTransformation&#39;s attachment interface.
bool m_keySet
Definition: randpool.h:66
uint8_t const size_t const size
Definition: sha3.h:20
#define NAMESPACE_END
Definition: config.h:201
word64 lword
Definition: config.h:245
#define CRYPTOPP_DLL
Definition: config.h:704
Ensures an object is not copyable.
Definition: misc.h:217
member_ptr< BlockCipher > m_pCipher
Definition: randpool.h:65