Passwordfile library 5.0.12
C++ library to read/write passwords from/to encrypted files
Loading...
Searching...
No Matches
opensslrandomdevice.h
Go to the documentation of this file.
1#ifndef PASSWORD_FILE_UTIL_OPENSSLRANDOMDEVICE_H
2#define PASSWORD_FILE_UTIL_OPENSSLRANDOMDEVICE_H
3
4#include "../global.h"
5
6#include <cstdint>
7#include <limits>
8
9namespace Util {
10
12public:
13 using result_type = std::uint32_t;
14
16 result_type operator()() const;
17 bool status() const;
18 static constexpr result_type min();
19 static constexpr result_type max();
20};
21
23{
24 return std::numeric_limits<result_type>::min();
25}
26
28{
29 return std::numeric_limits<result_type>::max();
30}
31
32} // namespace Util
33
34#endif // PASSWORD_FILE_UTIL_OPENSSLRANDOMDEVICE_H
Provides a random device using the OpenSSL function RAND_bytes().
static constexpr result_type max()
static constexpr result_type min()
#define PASSWORD_FILE_EXPORT
Marks the symbol to be exported by the passwordfile library.
Definition global.h:14
Contains utility classes and functions.
Definition openssl.h:9