mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-15 12:51:00 +02:00
Refactor: GetRandHash() method for util
This commit is contained in:
parent
096e06dbb5
commit
f718aedd9f
4 changed files with 12 additions and 15 deletions
|
|
@ -174,6 +174,12 @@ int GetRandInt(int nMax)
|
|||
return GetRand(nMax);
|
||||
}
|
||||
|
||||
uint256 GetRandHash()
|
||||
{
|
||||
uint256 hash;
|
||||
RAND_bytes((unsigned char*)&hash, sizeof(hash));
|
||||
return hash;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue