Passwordfile library  5.0.3
C++ library to read/write passwords from/to encrypted files
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 
9 namespace Util {
10 
12 public:
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
Util::OpenSslRandomDevice::max
static constexpr result_type max()
Definition: opensslrandomdevice.h:27
Util::OpenSslRandomDevice::min
static constexpr result_type min()
Definition: opensslrandomdevice.h:22
Util
Contains utility classes and functions.
Definition: openssl.h:9
PASSWORD_FILE_EXPORT
#define PASSWORD_FILE_EXPORT
Marks the symbol to be exported by the passwordfile library.
Util::OpenSslRandomDevice
Provides a random device using the OpenSSL function RAND_bytes().
Definition: opensslrandomdevice.h:11
Util::OpenSslRandomDevice::result_type
std::uint32_t result_type
Definition: opensslrandomdevice.h:13