|
rippled
|
A cryptographically secure random number engine. More...

Public Types | |
| using | result_type = std::uint64_t |
Public Member Functions | |
| csprng_engine (csprng_engine const &)=delete | |
| csprng_engine & | operator= (csprng_engine const &)=delete |
| csprng_engine (csprng_engine &&)=delete | |
| csprng_engine & | operator= (csprng_engine &&)=delete |
| csprng_engine () | |
| ~csprng_engine () | |
| void | mix_entropy (void *buffer=nullptr, std::size_t count=0) |
| Mix entropy into the pool. More... | |
| result_type | operator() () |
| Generate a random integer. More... | |
| void | operator() (void *ptr, std::size_t count) |
| Fill a buffer with the requested amount of random data. More... | |
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 |
| ripple::csprng_engine::csprng_engine | ( | ) |
Definition at line 30 of file csprng.cpp.
| ripple::csprng_engine::~csprng_engine | ( | ) |
Definition at line 37 of file csprng.cpp.
|
delete |
|
delete |
| void ripple::csprng_engine::mix_entropy | ( | void * | buffer = nullptr, |
| std::size_t | count = 0 |
||
| ) |
Mix entropy into the pool.
Definition at line 46 of file csprng.cpp.
| csprng_engine::result_type ripple::csprng_engine::operator() | ( | ) |
Generate a random integer.
Definition at line 91 of file csprng.cpp.
| void ripple::csprng_engine::operator() | ( | void * | ptr, |
| std::size_t | count | ||
| ) |
Fill a buffer with the requested amount of random data.
Definition at line 74 of file csprng.cpp.
|
staticconstexpr |
|
staticconstexpr |
|
private |
1.8.17