|
|
@ -82,13 +82,12 @@ void RandAddSeedPerfmon() |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
bool GetRandBytes(unsigned char* buf, int num) |
|
|
|
void GetRandBytes(unsigned char* buf, int num) |
|
|
|
{ |
|
|
|
{ |
|
|
|
if (RAND_bytes(buf, num) != 1) { |
|
|
|
if (RAND_bytes(buf, num) != 1) { |
|
|
|
LogPrintf("%s: OpenSSL RAND_bytes() failed with error: %s\n", __func__, ERR_error_string(ERR_get_error(), NULL)); |
|
|
|
LogPrintf("%s: OpenSSL RAND_bytes() failed with error: %s\n", __func__, ERR_error_string(ERR_get_error(), NULL)); |
|
|
|
return false; |
|
|
|
assert(false); |
|
|
|
} |
|
|
|
} |
|
|
|
return true; |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
uint64_t GetRand(uint64_t nMax) |
|
|
|
uint64_t GetRand(uint64_t nMax) |
|
|
|