|
| | FakeSecureRand (const unsigned char initial=0) |
| |
| std::string | name () const override |
| | Get the name of the random number generation algorithm.
|
| |
| void | rand_bytes (unsigned char *buf, size_t size) override |
| | Fill a buffer with random bytes.
|
| |
| bool | rand_bytes_noexcept (unsigned char *buf, size_t size) override |
| | Fill a buffer with random bytes without throwing exceptions.
|
| |
Public Member Functions inherited from openvpn::RandomAPI |
| template<typename T > |
| void | rand_fill (T &obj) |
| | Fill a data object with random bytes.
|
| |
| template<typename T > |
| T | rand_get () |
| | Create a data object filled with random bytes.
|
| |
| template<typename T > |
| T | rand_get_positive () |
| | Create a data object filled with random bytes, always >= 0 for signed types.
|
| |
| template<typename T > |
| T | randrange (const T end) |
| | Return a uniformly distributed random number in the range [0, end)
|
| |
| template<typename T > |
| T | randrange (const T start, const T end) |
| | Return a uniformly distributed random number in the range [start, end].
|
| |
| std::uint32_t | randrange32 (const std::uint32_t end) |
| | Return a uniformly distributed random number in the range [0, end)
|
| |
| std::uint32_t | randrange32 (const std::uint32_t start, const std::uint32_t end) |
| | Return a uniformly distributed random number in the range [start, end].
|
| |
| std::uint8_t | randbyte () |
| | Return a random byte.
|
| |
| bool | randbool () |
| | Return a random boolean.
|
| |
| result_type | operator() () |
| |
| | RC () noexcept=default |
| |
| | RC (const RC &)=delete |
| |
| virtual | ~RC ()=default |
| |
| RC & | operator= (const RC &)=delete |
| |
| olong | use_count () const noexcept |
| | Delegates call to RCImpl and returns the result.
|
| |
Predictable RNG that claims to be secure to be used in reproducable unit tests
Note: this is not fit to be used as UniformRandomBitGenerator since its maximum range is [0x03020100, 0xfffefdfc]. Especially the lower bound makes the std::shuffle implementation in libc++ loop endlessly.
Definition at line 334 of file test_helper.hpp.