git://git.novaco.in
/
novacoin.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
Refactor: GetRandHash() method for util
[novacoin.git]
/
src
/
util.cpp
diff --git
a/src/util.cpp
b/src/util.cpp
index
3569f22
..
d8804c7
100644
(file)
--- 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;
+}