Refactor: GetRandHash() method for util

This commit is contained in:
Gavin Andresen
2012-05-17 12:13:14 -04:00
parent 096e06dbb5
commit f718aedd9f
4 changed files with 12 additions and 15 deletions

View File

@@ -174,6 +174,12 @@ int GetRandInt(int nMax)
return GetRand(nMax);
}
uint256 GetRandHash()
{
uint256 hash;
RAND_bytes((unsigned char*)&hash, sizeof(hash));
return hash;
}