3 #include "../io/cryptoexception.h" 5 #include <c++utilities/conversion/binaryconversion.h> 7 #include <openssl/err.h> 8 #include <openssl/rand.h> 24 OpenSslRandomDevice::OpenSslRandomDevice()
31 uint32 OpenSslRandomDevice::operator()()
const 34 if (RAND_bytes(buf,
sizeof(buf))) {
35 return ConversionUtilities::LE::toUInt32(reinterpret_cast<char *>(buf));
40 while (
unsigned long errorCode = ERR_get_error()) {
41 if (!errorMsg.empty()) {
44 errorMsg += ERR_error_string(errorCode,
nullptr);
45 errorCode = ERR_get_error();
53 bool OpenSslRandomDevice::status()
const
Contains utility classes and functions.
The exception that is thrown when an encryption/decryption error occurs.