| 84 | } |
| 85 | |
| 86 | void GetRandBytes(unsigned char* buf, int num) |
| 87 | { |
| 88 | if (RAND_bytes(buf, num) != 1) { |
| 89 | LogPrintf("%s: OpenSSL RAND_bytes() failed with error: %s\n", __func__, ERR_error_string(ERR_get_error(), NULL)); |
| 90 | assert(false); |
| 91 | } |
| 92 | } |
| 93 | |
| 94 | uint64_t GetRand(uint64_t nMax) |
| 95 | { |
no outgoing calls