|
Botan
2.13.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.
|
explicit |
Device_EntropySource constructor Open a file descriptor to each (available) device in fsnames
Definition at line 24 of file dev_random.cpp.
References Botan::PKCS11::flags(), O_NOCTTY, and O_NONBLOCK.
| 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 67 of file entropy_srcs.cpp.
References BOTAN_UNUSED, and Botan::OS::running_in_privileged_state().
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().
1.8.9.1