mirror of
https://github.com/dogecoin/dogecoin.git
synced 2026-01-31 10:30:52 +00:00
Use sanity check timestamps as entropy
Cherry-picked from: 2c0a6f157da3c6bb3b0a1e77f003caf0d9cb9d6c
This commit is contained in:
parent
4a3c6ddc11
commit
23bc7a072e
@ -330,6 +330,10 @@ bool Random_SanityCheck()
|
||||
uint64_t stop = GetPerformanceCounter();
|
||||
if (stop == start) return false;
|
||||
|
||||
// We called GetPerformanceCounter. Use it as entropy.
|
||||
RAND_add((const unsigned char*)&start, sizeof(start), 1);
|
||||
RAND_add((const unsigned char*)&stop, sizeof(stop), 1);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user