9#ifndef CRYPTOPP_PADLOCK_RNG_H
10#define CRYPTOPP_PADLOCK_RNG_H
23 PadlockRNG_Err(
const std::string &operation)
25 PadlockRNG_Err(
const std::string &component,
const std::string &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;
132 FixedSizeAlignedSecBlock<word32, 4, true> m_buffer;
Exception(ErrorType errorType, const std::string &s)
Construct a new Exception.
@ OTHER_ERROR
Some other error occurred not belonging to other categories.
PadlockRNG(word32 divisor=1)
Construct a PadlockRNG generator.
virtual void DiscardBytes(size_t n)
Generate and discard n bytes.
virtual void GenerateBlock(byte *output, size_t size)
Generate random array of bytes.
word32 GetMSR() const
Get the MSR for the last operation.
word32 GetDivisor() const
Get the XSTORE divisor.
virtual void IncorporateEntropy(const byte *input, size_t length)
Update RNG state with additional unpredictable values.
std::string AlgorithmProvider() const
Retrieve the provider of this algorithm.
word32 SetDivisor(word32 divisor)
Set the XSTORE divisor.
Interface for random number generators.
unsigned int word32
32-bit unsigned datatype
Abstract base classes that provide a uniform interface to this library.
Crypto++ library namespace.
Classes and functions for secure memory allocations.