aboutsummaryrefslogtreecommitdiff
path: root/src/util.cpp
diff options
context:
space:
mode:
authorGavin Andresen <gavinandresen@gmail.com>2012-05-17 12:13:14 -0400
committerGavin Andresen <gavinandresen@gmail.com>2012-05-17 16:33:27 -0400
commitf718aedd9f244ee77a40f182bf6c6737730d975c (patch)
tree087a1464b04bb598e1bda62224495b90e821d3af /src/util.cpp
parent096e06dbb5241737e2f0f1ba1c4f969d68e6e7c5 (diff)
downloadbitcoin-f718aedd9f244ee77a40f182bf6c6737730d975c.tar.xz
Refactor: GetRandHash() method for util
Diffstat (limited to 'src/util.cpp')
-rw-r--r--src/util.cpp6
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;
+}