3 #include "../io/cryptoexception.h" 5 #include <c++utilities/conversion/binaryconversion.h> 7 #include <openssl/err.h> 8 #include <openssl/rand.h> 29 OpenSslRandomDevice::OpenSslRandomDevice()
36 uint32 OpenSslRandomDevice::operator()()
const 39 if (RAND_bytes(buf,
sizeof(buf))) {
40 return ConversionUtilities::LE::toUInt32(reinterpret_cast<char *>(buf));
43 unsigned long errorCode = ERR_get_error();
44 while (errorCode != 0) {
48 msg += ERR_error_string(errorCode, 0);
49 errorCode = ERR_get_error();
58 bool OpenSslRandomDevice::status()
const
Contains utility classes and functions.
The exception that is thrown when an encryption/decryption error occurs.