MySQL 9.1.0
Source Code Documentation
|
#include "my_rnd.h"
#include <mysql_com.h>
#include <openssl/err.h>
#include <openssl/rand.h>
#include "my_inttypes.h"
Functions | |
void | randominit (struct rand_struct *rand_st, ulong seed1, ulong seed2) |
double | my_rnd (struct rand_struct *rand_st) |
Generate random number. More... | |
int | my_rand_buffer (unsigned char *buffer, size_t buffer_size) |
Fill a buffer with random bytes using the SSL library routines. More... | |
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.
[out] | buffer | Buffer to receive the random data |
[in] | buffer_size | sizeof the the buffer |
1 | error occurred. |
0 | OK |
double my_rnd | ( | struct rand_struct * | rand_st | ) |
Generate random number.
[in,out] | rand_st | Structure used for number generation. |
Generated | pseudo random number. |
double my_rnd_ssl | ( | bool * | failed | ) |
Generate a random number using the OpenSSL supplied random number generator if available.
[out] | failed | set to TRUE if the method failed. FALSE if OK. |
Generated | random number or 0 if failed is set. |
void randominit | ( | struct rand_struct * | rand_st, |
ulong | seed1, | ||
ulong | seed2 | ||
) |