9 #ifndef CRYPTOPP_IMPORTS
17 NAMESPACE_BEGIN(CryptoPP)
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);
43 TimerWord tw = timer.GetCurrentTimerValue();
44 CRYPTOPP_COMPILE_ASSERT(
sizeof(tw) <= 16);
45 *(TimerWord *)m_seed.data() += tw;
47 time_t t = time(NULL);
48 CRYPTOPP_COMPILE_ASSERT(
sizeof(t) <= 8);
49 *(time_t *)(m_seed.data()+8) += t;
54 size_t len = UnsignedMin(16, size);
55 target.ChannelPut(channel, m_seed, len);
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)
set or reset the key of this object
implements the SHA-256 standard
void GenerateIntoBufferedTransformation(BufferedTransformation &target, const std::string &channel, lword size)
generate random bytes as input to a BufferedTransformation
AES winner, announced on 10/2/2000