Jack Grigg
7 years ago
No known key found for this signature in database
GPG Key ID: 6A6914DAFBEA00DA
2 changed files with
2 additions and
3 deletions
-
src/random.cpp
-
src/random.h
|
|
@ -19,7 +19,6 @@ |
|
|
|
#include <sys/time.h> |
|
|
|
#endif |
|
|
|
|
|
|
|
#include <openssl/err.h> |
|
|
|
#include "sodium.h" |
|
|
|
|
|
|
|
static inline int64_t GetPerformanceCounter() |
|
|
@ -37,7 +36,7 @@ static inline int64_t GetPerformanceCounter() |
|
|
|
|
|
|
|
void GetRandBytes(unsigned char* buf, size_t num) |
|
|
|
{ |
|
|
|
randombytes_buf(buf, (size_t) num); |
|
|
|
randombytes_buf(buf, num); |
|
|
|
} |
|
|
|
|
|
|
|
uint64_t GetRand(uint64_t nMax) |
|
|
|
|
|
@ -12,7 +12,7 @@ |
|
|
|
#include <stdint.h> |
|
|
|
|
|
|
|
/**
|
|
|
|
* Functions to gather random data via the libsodium PRNG |
|
|
|
* Functions to gather random data via the libsodium CSPRNG |
|
|
|
*/ |
|
|
|
void GetRandBytes(unsigned char* buf, size_t num); |
|
|
|
uint64_t GetRand(uint64_t nMax); |
|
|
|