Refactor: GetRandHash() method for util

This commit is contained in:
Gavin Andresen
2012-06-19 15:22:58 -04:00
parent 2d90330d8c
commit 28a498d5a6
4 changed files with 12 additions and 15 deletions
+6
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;
}