GATE
|
Random number generation. More...
Functions | |
GATE_CORE_API gate_result_t | gate_randomgenerator_create (gate_randomsession_t *session) |
Creates a random number generator instance and initializes a session object to access it. | |
GATE_CORE_API gate_result_t | gate_randomgenerator_get_num (gate_randomsession_t *session, gate_uint64_t *number) |
Generates a random 64-bit number. | |
GATE_CORE_API gate_result_t | gate_randomgenerator_get_buffer (gate_randomsession_t *session, void *buffer, gate_size_t bufferlen) |
Fills a byte buffer with random data. | |
GATE_CORE_API gate_result_t | gate_randomgenerator_destroy (gate_randomsession_t *session) |
Destroys the random number generator sessions and releases its resources. | |
Random number generation.
GATE_CORE_API gate_result_t gate_randomgenerator_create | ( | gate_randomsession_t * | session | ) |
Creates a random number generator instance and initializes a session object to access it.
[out] | session | pointer to session handle to be filled |
GATE_CORE_API gate_result_t gate_randomgenerator_get_num | ( | gate_randomsession_t * | session, |
gate_uint64_t * | number ) |
Generates a random 64-bit number.
[in] | session | pointer to session handle |
[out] | number | pointer to UI64 number to be filled with random bits |
GATE_CORE_API gate_result_t gate_randomgenerator_get_buffer | ( | gate_randomsession_t * | session, |
void * | buffer, | ||
gate_size_t | bufferlen ) |
Fills a byte buffer with random data.
[in] | session | pointer to session handle |
[out] | buffer | pointer to buffer to be filled with random data |
[in] | bufferlen | length of buffer in bytes |
GATE_CORE_API gate_result_t gate_randomgenerator_destroy | ( | gate_randomsession_t * | session | ) |
Destroys the random number generator sessions and releases its resources.
[in] | session | pointer to session handle to be destroyed |