diff options
author | Gavin Andresen <gavinandresen@gmail.com> | 2012-05-17 12:13:14 -0400 |
---|---|---|
committer | Gavin Andresen <gavinandresen@gmail.com> | 2012-05-17 16:33:27 -0400 |
commit | f718aedd9f244ee77a40f182bf6c6737730d975c (patch) | |
tree | 087a1464b04bb598e1bda62224495b90e821d3af /src/util.cpp | |
parent | 096e06dbb5241737e2f0f1ba1c4f969d68e6e7c5 (diff) |
Refactor: GetRandHash() method for util
Diffstat (limited to 'src/util.cpp')
-rw-r--r-- | src/util.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/util.cpp b/src/util.cpp index 3569f22ecd..d8804c7291 100644 --- a/src/util.cpp +++ b/src/util.cpp @@ -174,6 +174,12 @@ int GetRandInt(int nMax) return GetRand(nMax); } +uint256 GetRandHash() +{ + uint256 hash; + RAND_bytes((unsigned char*)&hash, sizeof(hash)); + return hash; +} |