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-06-19 15:22:58 -0400
commit28a498d5a6794bce952fe8a1938720b73946c1d8 (patch)
treecdf6d607a5699957f93c02e18ed6e60fb9cd8444 /src/util.cpp
parentCache signature verifications (diff)
downloaddiscoin-28a498d5a6794bce952fe8a1938720b73946c1d8.tar.xz
discoin-28a498d5a6794bce952fe8a1938720b73946c1d8.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;
+}