aboutsummaryrefslogtreecommitdiff
path: root/src/util.cpp
diff options
context:
space:
mode:
authorGavin Andresen <[email protected]>2012-05-17 12:13:14 -0400
committerGavin Andresen <[email protected]>2012-05-17 16:33:27 -0400
commitf718aedd9f244ee77a40f182bf6c6737730d975c (patch)
tree087a1464b04bb598e1bda62224495b90e821d3af /src/util.cpp
parentRefactor: move code from key.h to key.cpp (diff)
downloaddiscoin-f718aedd9f244ee77a40f182bf6c6737730d975c.tar.xz
discoin-f718aedd9f244ee77a40f182bf6c6737730d975c.zip
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 3569f22ec..d8804c729 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;
+}