ClanLib
2.3.7
|
Random class. More...
#include <random.h>
Public Member Functions | |
Construction | |
CL_Random (int cache_size=1024) | |
Constructs the object. More... | |
Operations | |
void | get_random_bytes (unsigned char *out_dest_ptr, int num_bytes) |
Get the random bytes. More... | |
void | get_random_bytes_nzero (unsigned char *out_dest_ptr, int num_bytes) |
Get the random bytes excluding bytes containing 0. More... | |
bool | get_random_bool () |
Get the random boolean. More... | |
Random class.
Uses the operating system cryptographically secure pseudorandom number generator
CL_Random::CL_Random | ( | int | cache_size = 1024 ) |
Constructs the object.
cache_size = Random number cache size
bool CL_Random::get_random_bool | ( | ) |
Get the random boolean.
out_dest_ptr = Where to write to num_bytes = Number of bytes to copy
void CL_Random::get_random_bytes | ( | unsigned char * | out_dest_ptr, |
int | num_bytes | ||
) |
Get the random bytes.
out_dest_ptr = Where to write to num_bytes = Number of bytes to copy
void CL_Random::get_random_bytes_nzero | ( | unsigned char * | out_dest_ptr, |
int | num_bytes | ||
) |
Get the random bytes excluding bytes containing 0.
out_dest_ptr = Where to write to num_bytes = Number of bytes to copy