From f718aedd9f244ee77a40f182bf6c6737730d975c Mon Sep 17 00:00:00 2001 From: Gavin Andresen Date: Thu, 17 May 2012 12:13:14 -0400 Subject: Refactor: GetRandHash() method for util --- src/util.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/util.cpp') 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; +} -- cgit v1.2.3