| 1 |
#include <openssl/rand.h> |
| 2 |
|
| 3 |
#include "Platform_fp.h" |
| 4 |
|
| 5 |
// We get entropy from OpenSSL which gets its entropy from the OS. |
| 6 |
int32_t _plat__GetEntropy(uint8_t *entropy, uint32_t amount) { |
| 7 |
if (RAND_bytes(entropy, amount) != 1) { |
| 8 |
return -1; |
| 9 |
} |
| 10 |
return amount; |
| 11 |
} |