A wrapper to use OpenSSL PRNGs.
More...
#include <stddef.h>
Go to the source code of this file.
|
double | my_rnd_ssl (bool *failed) |
| Generate a random number using the OpenSSL supplied random number generator if available. More...
|
|
int | my_rand_buffer (unsigned char *buffer, size_t buffer_size) |
| Fill a buffer with random bytes using the SSL library routines. More...
|
|
A wrapper to use OpenSSL PRNGs.
◆ my_rand_buffer()
int my_rand_buffer |
( |
unsigned char * |
buffer, |
|
|
size_t |
buffer_size |
|
) |
| |
Fill a buffer with random bytes using the SSL library routines.
- Parameters
-
[out] | buffer | Buffer to receive the random data |
[in] | buffer_size | sizeof the the buffer |
- Return values
-
◆ my_rnd_ssl()
double my_rnd_ssl |
( |
bool * |
failed | ) |
|
Generate a random number using the OpenSSL supplied random number generator if available.
- Parameters
-
[out] | failed | set to TRUE if the method failed. FALSE if OK. |
- Return values
-
Generated | random number or 0 if failed is set. |