herald
2.0.0
|
#include <randomness.h>
Public Member Functions | |
RandomnessGenerator (RandomnessSourceT &&toOwn) | |
template<typename T > | |
void | addEntropy (T entropy) |
std::string | methodName () const |
void | nextBytes (std::size_t count, Data &into) |
int | nextInt () |
double | nextDouble () |
The Randomness Generator IS A source of randomness, but may also be used by the application to inject a secondary source of entropy in to the result of the underlying RandomnessSource implementation.
This is the class used by Herald. This allows application developers to use the most appropriate randomness source for their target platform and application needs.
A secondary source of entropy may be something else going on in the app. In Herald, for example, it could be the time it actually takes to complete a scan-and-interact loop. This combines outside effects of communication, internal timer/interrupt timing changes, and internal state computation times to make the entropy unpredictable.