random.h File Reference

Random module header file. More...

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

Go to the source code of this file.

Functions

MCL_LOCAL mcl_error_t random_generate_number (mcl_uint32_t *random_number)
 
MCL_LOCAL mcl_error_t random_generate_guid (char **guid)
 

Detailed Description

Random module header file.

Definition in file random.h.

Function Documentation

MCL_LOCAL mcl_error_t random_generate_guid ( char **  guid)

This function generates random guid.

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 80 of file random.c.

References guid_t::clk_seq_hi_res, guid_t::clk_seq_low, guid_t::guid_fields, GUID_LENGTH, MCL_ASSERT_CODE_MESSAGE, MCL_ASSERT_STATEMENT_CODE_MESSAGE, MCL_DEBUG_ENTRY, MCL_DEBUG_LEAVE, MCL_FREE, MCL_MALLOC, MCL_NULL, MCL_OK, MCL_OUT_OF_MEMORY, guid_t::node, guid_t::rnd, security_generate_random_bytes(), string_util_snprintf(), guid_t::time_hi_and_version, guid_t::time_low, and guid_t::time_mid.

Referenced by _add_jwks(), mcl_random_generate_guid(), and security_handler_generate_jti().

Here is the call graph for this function:

Here is the caller graph for this function:

MCL_LOCAL mcl_error_t random_generate_number ( mcl_uint32_t random_number)

This function generates random integer number.

Parameters
[out]random_numberPointer to the random number generated.
Returns
  • MCL_OK in case of success.
  • MCL_FAIL in case of an internal error in random number generation.

Definition at line 68 of file random.c.

References MCL_DEBUG_ENTRY, MCL_DEBUG_LEAVE, and security_generate_random_bytes().

Here is the call graph for this function: