Crypto++
8.6
Free C++ class library of cryptographic schemes
|
Go to the documentation of this file.
9 #ifndef CRYPTOPP_PADLOCK_RNG_H
10 #define CRYPTOPP_PADLOCK_RNG_H
24 :
Exception(OTHER_ERROR,
"PadlockRNG: " + operation +
" operation failed") {}
25 PadlockRNG_Err(
const std::string &component,
const std::string &message)
26 :
Exception(OTHER_ERROR, component +
": " + message) {}
53 CRYPTOPP_STATIC_CONSTEXPR
const char* StaticAlgorithmName() {
return "PadlockRNG"; }
96 CRYPTOPP_UNUSED(input); CRYPTOPP_UNUSED(length);
107 m_divisor = DivisorHelper(divisor);
128 return divisor > 3 ? 3 : divisor;
138 #endif // CRYPTOPP_PADLOCK_RNG_H
Classes and functions for secure memory allocations.
PadlockRNG(word32 divisor=1)
Construct a PadlockRNG generator.
word32 GetMSR() const
Get the MSR for the last operation.
unsigned int word32
32-bit unsigned datatype
word32 GetDivisor() const
Get the XSTORE divisor.
Interface for random number generators.
Base class for all exceptions thrown by the library.
Hardware generated random numbers using VIA XSTORE.
Crypto++ library namespace.
std::string AlgorithmProvider() const
Retrieve the provider of this algorithm.
virtual void DiscardBytes(size_t n)
Generate and discard n bytes.
virtual void IncorporateEntropy(const byte *input, size_t length)
Update RNG state with additional unpredictable values.
word32 SetDivisor(word32 divisor)
Set the XSTORE divisor.
Abstract base classes that provide a uniform interface to this library.
virtual void GenerateBlock(byte *output, size_t size)
Generate random array of bytes.
Exception thrown when a PadlockRNG generator encounters a generator related error.