mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-01-20 23:29:12 +01:00
Refactor: GetRandHash() method for util
This commit is contained in:
@@ -174,6 +174,12 @@ int GetRandInt(int nMax)
|
||||
return GetRand(nMax);
|
||||
}
|
||||
|
||||
uint256 GetRandHash()
|
||||
{
|
||||
uint256 hash;
|
||||
RAND_bytes((unsigned char*)&hash, sizeof(hash));
|
||||
return hash;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user