|
xrpld
|
A cryptographically secure random number engine. More...
#include <csprng.h>

Public Types | |
| using | result_type = std::uint64_t |
Public Member Functions | |
| CsprngEngine (CsprngEngine const &)=delete | |
| CsprngEngine & | operator= (CsprngEngine const &)=delete |
| CsprngEngine (CsprngEngine &&)=delete | |
| CsprngEngine & | operator= (CsprngEngine &&)=delete |
| CsprngEngine () | |
| ~CsprngEngine () | |
| void | mixEntropy (void *buffer=nullptr, std::size_t count=0) |
| Mix entropy into the pool. | |
| result_type | operator() () |
| Generate a random integer. | |
| void | operator() (void *ptr, std::size_t count) |
| Fill a buffer with the requested amount of random data. | |
Static Public Member Functions | |
| static constexpr result_type | min () |
| static constexpr result_type | max () |
Private Attributes | |
| std::mutex | mutex_ |
A cryptographically secure random number engine.
The engine is thread-safe (it uses a lock to serialize access) and will, automatically, mix in some randomness from std::random_device.
Meets the requirements of UniformRandomNumberEngine
|
delete |
|
delete |
| xrpl::CsprngEngine::CsprngEngine | ( | ) |
Definition at line 16 of file libxrpl/crypto/csprng.cpp.
| xrpl::CsprngEngine::~CsprngEngine | ( | ) |
Definition at line 23 of file libxrpl/crypto/csprng.cpp.
|
delete |
|
delete |
| void xrpl::CsprngEngine::mixEntropy | ( | void * | buffer = nullptr, |
| std::size_t | count = 0 ) |
Mix entropy into the pool.
Definition at line 32 of file libxrpl/crypto/csprng.cpp.
| CsprngEngine::result_type xrpl::CsprngEngine::operator() | ( | ) |
Generate a random integer.
Definition at line 73 of file libxrpl/crypto/csprng.cpp.
| void xrpl::CsprngEngine::operator() | ( | void * | ptr, |
| std::size_t | count ) |
Fill a buffer with the requested amount of random data.
Definition at line 57 of file libxrpl/crypto/csprng.cpp.
|
staticconstexpr |
|
staticconstexpr |
|
private |