qcrypto_rng_bytes()

Updated: April 19, 2023

Retrieve RNG bytes

Synopsis:

#include <qcrypto/qcrypto.h>
int qcrypto_rng_bytes(qcrypto_ctx_t *ctx,
                      uint8_t *buf,
                      size_t size)

Arguments:

ctx
The algorithm context object.
buf
The buffer to store the random bytes in.
size
The buffer size.

Library:

libqcrypto

Description:

This function extracts a random value from the PRNG (pseudorandom number generator).

Returns:

QCRYPTO_R_EOK if successful or qcrypto_errno if an error occurred.