8 #ifndef CRYPTOPP_RDRAND_H 9 #define CRYPTOPP_RDRAND_H 33 : Exception(OTHER_ERROR,
"RDRAND: " + operation +
" operation failed") {}
75 #if (CRYPTOPP_BOOL_X86 || CRYPTOPP_BOOL_X32 || CRYPTOPP_BOOL_X64) 80 throw NotImplemented(
"RDRAND: rdrand is not available on this platform");
89 #if (CRYPTOPP_BOOL_X86 || CRYPTOPP_BOOL_X32 || CRYPTOPP_BOOL_X64) 94 throw NotImplemented(
"RDRAND: rdrand is not available on this platform");
120 :
Exception(OTHER_ERROR,
"RDSEED: " + operation +
" operation failed") {}
159 #if (CRYPTOPP_BOOL_X86 || CRYPTOPP_BOOL_X32 || CRYPTOPP_BOOL_X64) 164 throw NotImplemented(
"RDSEED: rdseed is not available on this platform");
173 #if (CRYPTOPP_BOOL_X86 || CRYPTOPP_BOOL_X32 || CRYPTOPP_BOOL_X64) 178 throw NotImplemented(
"RDSEED: rdseed is not available on this platform");
199 #endif // CRYPTOPP_RDRAND_H Base class for all exceptions thrown by the library.
virtual void GenerateBlock(byte *output, size_t size)
Generate random array of bytes.
virtual void GenerateBlock(byte *output, size_t size)
Generate random array of bytes.
Hardware generated random numbers using RDRAND instruction.
virtual void IncorporateEntropy(const byte *input, size_t length)
Update RNG state with additional unpredictable values.
#define NAMESPACE_BEGIN(x)
Abstract base classes that provide a uniform interface to this library.
RDSEED(unsigned int retries=64)
Construct a RDSEED generator.
Interface for random number generators.
virtual void IncorporateEntropy(const byte *input, size_t length)
Update RNG state with additional unpredictable values.
void SetRetries(unsigned int retries)
Set the number of retries used by the generator.
Exception thrown when a RDRAND generator encounters a generator related error.
virtual void DiscardBytes(size_t n)
Generate and discard n bytes.
A method was called which was not implemented.
virtual void DiscardBytes(size_t n)
Generate and discard n bytes.
unsigned int GetRetries() const
Retrieve the number of retries used by the generator.
std::string AlgorithmName() const
Provides the name of this algorithm.
Hardware generated random numbers using RDSEED instruction.
uint8_t const size_t const size
#define CRYPTOPP_UNUSED(x)
RDRAND(unsigned int retries=4)
Construct a RDRAND generator.
void SetRetries(unsigned int retries)
Set the number of retries used by the generator.
RDRAND_Err(const std::string &operation)
unsigned int GetRetries() const
Retrieve the number of retries used by the generator.
std::string AlgorithmName() const
Provides the name of this algorithm.
RDSEED_Err(const std::string &operation)
Exception thrown when a RDSEED generator encounters a generator related error.