# RNG Cryptographic

# RNG Cryptographic

This module includes functions that generates cryptographic random numbers.

## Summary

| ### Functions ||
|---|---|
| `https://openthread.io/reference/group/api-random-crypto#group__api-random-crypto_1ga411d4ba6d8b84ca985adc162704176bc(uint8_t *aBuffer, uint16_t aSize)` | `https://openthread.io/reference/group/api-error#group__api-error_1gabaaa90aaa35da8f9d394a227a23a6a49` Fills a given buffer with cryptographically secure random bytes. |

## Functions

### otRandomCryptoFillBuffer

```
otError otRandomCryptoFillBuffer(
  uint8_t *aBuffer,
  uint16_t aSize
)
```
Fills a given buffer with cryptographically secure random bytes.

<br />

| Details ||
|---|---|
| Parameters | |---|---| | `[out] aBuffer` | A pointer to a buffer to fill with the random bytes. | | `[in] aSize` | Size of buffer (number of bytes to fill). | |

## Resources

OpenThread API Reference topics originate from the source code, available
on [GitHub](https://github.com/openthread/openthread/tree/main/include/openthread).
For more information, or to contribute to our documentation, refer to
[Resources](https://openthread.io/resources).