Crypto++
5.6.5
Free C++ class library of cryptographic schemes
|
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());
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;
const T1 UnsignedMin(const T1 &a, const T2 &b)
Safe comparison of values that could be neagtive and incorrectly promoted.
#define CRYPTOPP_COMPILE_ASSERT(expr)
Compile time assertion.
Class file for Randomness Pool.
Class file for the AES cipher (Rijndael)
Classes for SHA-1 and SHA-2 family of message digests.
void IncorporateEntropy(const byte *input, size_t length)
Update RNG state with additional unpredictable values.
Randomness Pool based on AES-256.
void Update(const byte *input, size_t length)
Updates a hash with additional input.
Crypto++ library namespace.
void GenerateIntoBufferedTransformation(BufferedTransformation &target, const std::string &channel, lword size)
Generate random bytes into a BufferedTransformation.
virtual void SetKey(const byte *key, size_t length, const NameValuePairs ¶ms=g_nullNameValuePairs)
Sets or reset the key of this object.
A::pointer data()
Provides a pointer to the first element in the memory block.
AES block cipher (Rijndael)
implements the SHA-256 standard