m2mb API docs  25.20.008
m2mb API sets documentation
M2MB_PRNG

Pseudo random number generator.
More...

Macros

#define M2MB_CRYPTO_PRNG_MAX_BYTES   512
 

Functions

UINT32 m2mb_crypto_prng_get_data (UINT8 *prng_data, UINT32 prng_data_len)
 Generates prng data. More...
 

Detailed Description

Pseudo random number generator.

Macro Definition Documentation

◆ M2MB_CRYPTO_PRNG_MAX_BYTES

#define M2MB_CRYPTO_PRNG_MAX_BYTES   512

Maximum number of PRNG bytes read

Function Documentation

◆ m2mb_crypto_prng_get_data()

UINT32 m2mb_crypto_prng_get_data ( UINT8 *  prng_data,
UINT32  prng_data_len 
)

Generates prng data.

This function will generate prng data with the given size but at most M2MB_CRYPTO_PRNG_MAX_BYTES bytes.

Parameters
[out]prng_dataBuffer that will hold the result prng data (buffer length is at least <prng_data_len>).
[in]prng_data_lenThe size of the prng_data buffer but cannot exceed M2MB_CRYPTO_PRNG_MAX_BYTES.
Returns
The number of generated prng bytes.
Note
<Notes>

Example

<C code example>