X-Git-Url: https://git.novaco.in/?a=blobdiff_plain;f=src%2Fuint256.cpp;fp=src%2Fuint256.cpp;h=e4b5f37fa36bee8add9e3bfb7247e13c72f5bdd2;hb=dd567acb90c39848ed8a167f52fa50ab9de5ab69;hp=aad4bace57272289e4383b9a2f87044c638198e8;hpb=0cb45221c0de742e47d21f9007ecd412aa0d87b6;p=novacoin.git diff --git a/src/uint256.cpp b/src/uint256.cpp index aad4bac..e4b5f37 100644 --- a/src/uint256.cpp +++ b/src/uint256.cpp @@ -7,7 +7,9 @@ #include #include #include -#include +#include + +#include #include "uint256.h" @@ -215,3 +217,10 @@ uint256::uint256(const std::vector& vch) else *this = 0; } + +uint256 GetRandHash() +{ + uint256 hash; + RAND_bytes(hash.begin(), hash.size()); + return hash; +}