Passwordfile library  4.0.0
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 <c++utilities/conversion/types.h>
7 
8 #include <limits>
9 
10 namespace Util {
11 
13 public:
14  using result_type = uint32;
15 
17  result_type operator()() const;
18  bool status() const;
19  static constexpr result_type min();
20  static constexpr result_type max();
21 };
22 
24 {
25  return std::numeric_limits<result_type>::min();
26 }
27 
29 {
30  return std::numeric_limits<result_type>::max();
31 }
32 
33 } // namespace Util
34 
35 #endif // PASSWORD_FILE_UTIL_OPENSSLRANDOMDEVICE_H
static constexpr result_type max()
static constexpr result_type min()
Contains utility classes and functions.
Definition: openssl.h:9
#define PASSWORD_FILE_EXPORT
Marks the symbol to be exported by the passwordfile library.
Provides a random device using the OpenSSL function RAND_bytes().