#include <entropy_src.h>
Definition at line 56 of file entropy_src.h.
| Botan::Entropy_Sources::Entropy_Sources |
( |
| ) |
|
|
default |
| Botan::Entropy_Sources::Entropy_Sources |
( |
const std::vector< std::string > & |
sources | ) |
|
|
explicit |
| void Botan::Entropy_Sources::add_source |
( |
std::unique_ptr< Entropy_Source > |
src | ) |
|
| std::vector< std::string > Botan::Entropy_Sources::enabled_sources |
( |
| ) |
const |
Definition at line 139 of file entropy_srcs.cpp.
References name.
141 std::vector<std::string> sources;
142 for(
size_t i = 0; i != m_srcs.size(); ++i)
144 sources.push_back(m_srcs[i]->
name());
Definition at line 191 of file entropy_srcs.cpp.
193 static Entropy_Sources global_entropy_sources(BOTAN_ENTROPY_DEFAULT_SOURCES);
195 return global_entropy_sources;
Entropy_Sources()=default
| size_t Botan::Entropy_Sources::poll |
( |
RandomNumberGenerator & |
rng, |
|
|
size_t |
bits, |
|
|
std::chrono::milliseconds |
timeout |
|
) |
| |
Definition at line 149 of file entropy_srcs.cpp.
Referenced by Botan::RandomNumberGenerator::reseed().
153 typedef std::chrono::system_clock clock;
155 auto deadline = clock::now() + timeout;
157 size_t bits_collected = 0;
159 for(
size_t i = 0; i != m_srcs.size(); ++i)
161 bits_collected += m_srcs[i]->poll(rng);
163 if (bits_collected >= poll_bits || clock::now() > deadline)
167 return bits_collected;
Poll just a single named source. Ordinally only used for testing
Definition at line 170 of file entropy_srcs.cpp.
References name.
172 for(
size_t i = 0; i != m_srcs.size(); ++i)
174 if(m_srcs[i]->
name() == the_src)
176 return m_srcs[i]->poll(rng);
The documentation for this class was generated from the following files: