diff options
Diffstat (limited to 'src/random.h')
-rw-r--r-- | src/random.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/random.h b/src/random.h index 8af616f8ea..82dd6ecf9f 100644 --- a/src/random.h +++ b/src/random.h @@ -35,7 +35,6 @@ * that fast seeding includes, but additionally: * - OS entropy (/dev/urandom, getrandom(), ...). The application will terminate if * this entropy source fails. - * - Bytes from OpenSSL's RNG (which itself may be seeded from various sources) * - Another high-precision timestamp (indirectly committing to a benchmark of all the * previous sources). * These entropy sources are slower, but designed to make sure the RNG state contains @@ -91,6 +90,14 @@ void GetStrongRandBytes(unsigned char* buf, int num) noexcept; void RandAddPeriodic() noexcept; /** + * Gathers entropy from the low bits of the time at which events occur. Should + * be called with a uint32_t describing the event at the time an event occurs. + * + * Thread-safe. + */ +void RandAddEvent(const uint32_t event_info); + +/** * Fast randomness source. This is seeded once with secure random data, but * is completely deterministic and does not gather more entropy after that. * |