diff options
author | Matt Corallo <git@bluematt.me> | 2019-11-23 11:42:23 -0500 |
---|---|---|
committer | Matt Corallo <git@bluematt.me> | 2019-11-23 16:06:34 -0500 |
commit | 02d8c56a18b9a2960888d6ec1209955105bae847 (patch) | |
tree | 9013a23918ed55059a39fa56ae93ef6951456607 /src/random.h | |
parent | 33c103e2fe67e32e9f4e783fa243dd2bba6b1682 (diff) |
Seed RNG with precision timestamps on receipt of net messages.
Diffstat (limited to 'src/random.h')
-rw-r--r-- | src/random.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/random.h b/src/random.h index 2d8ab085e3..b6e70fcb1f 100644 --- a/src/random.h +++ b/src/random.h @@ -90,6 +90,14 @@ void GetStrongRandBytes(unsigned char* buf, int num) noexcept; void RandAddPeriodic(); /** + * 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. * |