|
OpenVPN 3 Core Library
|
Public Types | |
| typedef RCPtr< IntegralMin > | Ptr |
Public Types inherited from openvpn::WeakRandomAPI | |
| typedef RCPtr< WeakRandomAPI > | Ptr |
| Smart pointer type for managing the ownership of WeakRandomAPI objects. | |
Public Types inherited from openvpn::RandomAPI | |
| typedef RCPtr< RandomAPI > | Ptr |
| Smart pointer type for managing the ownership of RandomAPI objects. | |
| typedef unsigned int | result_type |
Public Types inherited from openvpn::RC< thread_unsafe_refcount > | |
| typedef RCPtr< RC > | Ptr |
Public Member Functions | |
| OPENVPN_EXCEPTION (s_min_error) | |
| 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. | |
| IntegralT | get_result () |
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() () |
Public Member Functions inherited from openvpn::RC< thread_unsafe_refcount > | |
| 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. | |
Additional Inherited Members | |
Static Public Member Functions inherited from openvpn::RandomAPI | |
| static constexpr result_type | min () |
| static constexpr result_type | max () |
Static Public Member Functions inherited from openvpn::RC< thread_unsafe_refcount > | |
| static constexpr bool | is_thread_safe () |
| Delegates call to RCImpl and returns the result. | |
Definition at line 9 of file test_randapi.cpp.
| typedef RCPtr<IntegralMin> IntegralMin< IntegralT >::Ptr |
Definition at line 14 of file test_randapi.cpp.
|
inline |
|
inlineoverridevirtual |
Get the name of the random number generation algorithm.
Implements openvpn::RandomAPI.
Definition at line 17 of file test_randapi.cpp.
| IntegralMin< IntegralT >::OPENVPN_EXCEPTION | ( | s_min_error | ) |
|
inlineoverridevirtual |
Fill a buffer with random bytes.
| buf | Pointer to the buffer |
| size | Number of bytes to generate |
Implements openvpn::RandomAPI.
Definition at line 23 of file test_randapi.cpp.
|
inlineoverridevirtual |
Fill a buffer with random bytes without throwing exceptions.
| buf | Pointer to the buffer |
| size | Number of bytes to generate |
Implements openvpn::RandomAPI.
Definition at line 31 of file test_randapi.cpp.