Botan
2.1.0
Crypto and TLS for C++11
|
#include <dev_random.h>
Public Member Functions | |
Device_EntropySource (const std::vector< std::string > &fsnames) | |
std::string | name () const override |
size_t | poll (RandomNumberGenerator &rng) override |
~Device_EntropySource () | |
Static Public Member Functions | |
static std::unique_ptr< Entropy_Source > | create (const std::string &type) |
Entropy source reading from kernel devices like /dev/random
Definition at line 20 of file dev_random.h.
Botan::Device_EntropySource::Device_EntropySource | ( | const std::vector< std::string > & | fsnames | ) |
Device_EntropySource constructor Open a file descriptor to each (available) device in fsnames
Definition at line 23 of file dev_random.cpp.
References Botan::PKCS11::flags(), Botan::CT::max(), O_NOCTTY, O_NONBLOCK, and Botan::ASN1::to_string().
Botan::Device_EntropySource::~Device_EntropySource | ( | ) |
Device_EntropySource destructor: close all open devices
Definition at line 69 of file dev_random.cpp.
|
staticinherited |
Return a new entropy source of a particular type, or null Each entropy source may require substantial resources (eg, a file handle or socket instance), so try to share them among multiple RNGs, or just use the preconfigured global list accessed by Entropy_Sources::global_sources()
Definition at line 45 of file entropy_srcs.cpp.
Referenced by Botan::Entropy_Sources::Entropy_Sources().
|
inlineoverridevirtual |
Implements Botan::Entropy_Source.
Definition at line 23 of file dev_random.h.
|
overridevirtual |
Gather entropy from a RNG device
Implements Botan::Entropy_Source.
Definition at line 81 of file dev_random.cpp.
References Botan::RandomNumberGenerator::add_entropy(), and Botan::CT::select().