9 #ifndef CRYPTOPP_IMPORTS 20 : m_pCipher(new
AES::Encryption), m_keySet(false)
22 memset(m_key, 0, m_key.SizeInBytes());
23 memset(m_seed, 0, m_seed.SizeInBytes());
29 hash.Update(m_key, 32);
30 hash.Update(input, length);
40 m_pCipher->
SetKey(m_key, 32);
46 TimerWord tw = timer.GetCurrentTimerValue();
48 *(TimerWord *)(
void*)m_seed.
data() += tw;
49 time_t t = time(NULL);
53 word64 tt1 = 0, tt2 = (word64)t;
54 memcpy(&tt1, m_seed.
data()+8, 8);
55 memcpy(m_seed.
data()+8, &(tt2 += tt1), 8);
58 *((
volatile TimerWord*)&tw) = 0;
59 *((
volatile word64*)&tt1) = 0;
60 *((
volatile word64*)&tt2) = 0;
void IncorporateEntropy(const byte *input, size_t length)
Update RNG state with additional unpredictable values.
virtual void SetKey(const byte *key, size_t length, const NameValuePairs ¶ms=g_nullNameValuePairs)
Sets or reset the key of this object.
implements the SHA-256 standard
Class file for Randomness Pool.
void GenerateIntoBufferedTransformation(BufferedTransformation &target, const std::string &channel, lword size)
Generate random bytes into a BufferedTransformation.
#define CRYPTOPP_COMPILE_ASSERT(expr)
Compile time assertion.
A::pointer data()
Provides a pointer to the first element in the memory block.
Class file for the AES cipher (Rijndael)
const T1 UnsignedMin(const T1 &a, const T2 &b)
Safe comparison of values that could be neagtive and incorrectly promoted.
AES block cipher (Rijndael)
Classes for SHA-1 and SHA-2 family of message digests.
Crypto++ library namespace.