mcl_random.h File Reference

Random module interface header file. More...

Include dependency graph for mcl_random.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

MCL_CORE_EXPORT mcl_error_t mcl_random_generate_guid (char **guid)
 
MCL_CORE_EXPORT mcl_error_t mcl_random_generate_bytes (unsigned char *buffer, mcl_size_t size)
 

Detailed Description

Random module interface header file.

This module includes functions to generate arbitrary size random numbers and GUID.

Definition in file mcl_random.h.

Function Documentation

MCL_CORE_EXPORT mcl_error_t mcl_random_generate_bytes ( unsigned char *  buffer,
mcl_size_t  size 
)

This function generates random bytes.

Parameters
[out]bufferArray for random bytes.
[in]sizeSize of array in bytes.
Returns

Definition at line 53 of file random.c.

References MCL_ASSERT_NOT_NULL, MCL_DEBUG_ENTRY, MCL_DEBUG_LEAVE, MCL_FUNCTION_LEAVE_LABEL, and security_generate_random_bytes().

Here is the call graph for this function:

MCL_CORE_EXPORT mcl_error_t mcl_random_generate_guid ( char **  guid)

This function generates globally unique identifier.

Parameters
[out]guidRandom guid.
Returns
  • MCL_OK in case of success.
  • MCL_OUT_OF_MEMORY in case there is not enough memory in the system to proceed.
  • MCL_FAIL in case of an internal error in random number generation.

Definition at line 37 of file random.c.

References MCL_ASSERT_CODE_MESSAGE, MCL_ASSERT_NOT_NULL, MCL_DEBUG_ENTRY, MCL_DEBUG_LEAVE, MCL_FUNCTION_LEAVE_LABEL, MCL_OK, and random_generate_guid().

Here is the call graph for this function: