diff options
| author | Gavin Andresen <[email protected]> | 2012-05-17 12:13:14 -0400 |
|---|---|---|
| committer | Gavin Andresen <[email protected]> | 2012-05-17 16:33:27 -0400 |
| commit | f718aedd9f244ee77a40f182bf6c6737730d975c (patch) | |
| tree | 087a1464b04bb598e1bda62224495b90e821d3af /src/util.cpp | |
| parent | Refactor: move code from key.h to key.cpp (diff) | |
| download | discoin-f718aedd9f244ee77a40f182bf6c6737730d975c.tar.xz discoin-f718aedd9f244ee77a40f182bf6c6737730d975c.zip | |
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 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; +} |