kcapi_rng_get_bytes
Prev | Random Number API - Convenience | Next

## Name

kcapi_rng_get_bytes — Convenience function to generate random bytes

## Synopsis

`ssize_t kcapi_rng_get_bytes (` | uint8_t * buffer,
| size_t outlen`)`;

## Arguments

`buffer`

  [out] filled with the random number

`outlen`

  [in] buffer length

## Description

This convenience function generates random bytes of the size of outlen and stores them into the provided buffer.

`return` size of random number generated upon success; -EIO - data cannot be obtained

Prev | Up | Next
Random Number API - Convenience | Home | Asymmetric Cipher API - Generic