mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-07-07 08:50:26 +02:00
Use sanity check timestamps as entropy
This commit is contained in:
@ -298,6 +298,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;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user