Botan 3.9.0
Crypto and TLS for C&
|
#include <entropy_src.h>
Public Member Functions | |
void | add_source (std::unique_ptr< Entropy_Source > src) |
std::vector< std::string > | enabled_sources () const |
Entropy_Sources ()=default | |
Entropy_Sources (const Entropy_Sources &other)=delete | |
Entropy_Sources (const std::vector< std::string > &sources) | |
Entropy_Sources (Entropy_Sources &&other)=delete | |
Entropy_Sources & | operator= (const Entropy_Sources &other)=delete |
Entropy_Sources & | operator= (Entropy_Sources &&other)=delete |
size_t | poll (RandomNumberGenerator &rng, size_t bits, std::chrono::milliseconds timeout) |
size_t | poll_just (RandomNumberGenerator &rng, std::string_view src) |
~Entropy_Sources ()=default |
Static Public Member Functions | |
static Entropy_Sources & | global_sources () |
Definition at line 56 of file entropy_src.h.
|
default |
References Entropy_Sources().
Referenced by Entropy_Sources(), Entropy_Sources(), Entropy_Sources(), global_sources(), operator=(), and operator=().
|
explicit |
Definition at line 200 of file entropy_srcs.cpp.
References add_source(), and Botan::Entropy_Source::create().
|
delete |
References Entropy_Sources().
|
delete |
References Entropy_Sources().
|
default |
void Botan::Entropy_Sources::add_source | ( | std::unique_ptr< Entropy_Source > | src | ) |
Definition at line 154 of file entropy_srcs.cpp.
Referenced by Entropy_Sources().
std::vector< std::string > Botan::Entropy_Sources::enabled_sources | ( | ) | const |
Definition at line 160 of file entropy_srcs.cpp.
|
static |
Definition at line 206 of file entropy_srcs.cpp.
References Entropy_Sources().
Referenced by Botan::AutoSeeded_RNG::AutoSeeded_RNG().
|
delete |
References Entropy_Sources().
|
delete |
References Entropy_Sources().
size_t Botan::Entropy_Sources::poll | ( | RandomNumberGenerator & | rng, |
size_t | bits, | ||
std::chrono::milliseconds | timeout ) |
Poll all sources to collect bits
of entropy with a timeout
. Entropy collection is aborted as soon as either the requested number of bits are obtained or the timeout runs out. If the target system does not provide a clock, the timeout is ignored.
Note that the timeout is cooperative. If the poll() method of an entropy source blocks forever, this invocation will potentially also block.
Definition at line 169 of file entropy_srcs.cpp.
Referenced by Botan::RandomNumberGenerator::reseed().
size_t Botan::Entropy_Sources::poll_just | ( | RandomNumberGenerator & | rng, |
std::string_view | src ) |
Poll just a single named source. Ordinally only used for testing
Definition at line 190 of file entropy_srcs.cpp.