herald  2.0.0
Public Member Functions | List of all members
herald::datatype::RandomnessGenerator< RandomnessSourceT > Class Template Reference

#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 ()

Detailed Description

template<typename RandomnessSourceT>
class herald::datatype::RandomnessGenerator< RandomnessSourceT >

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.

The documentation for this class was generated from the following file: