---
name: "crypto_rng_get_bytes"
section: "9"
platform: "linux"
package: "linux-manual-4.9"
version: "4.9.228-1"
release: "Debian 9 (Stretch)"
platforms: ["linux"]
url: "https://new.carta.tech/crypto_rng_get_bytes"
---

# crypto\_rng\_get\_bytes(9)

get random number

## NAME

crypto\_rng\_get\_bytes - get random number

## SYNOPSIS

**int crypto\_rng\_get\_bytes(struct crypto\_rng \*** *tfm***, u8 \*** *rdata***, unsigned int** *dlen***);**

## ARGUMENTS

*tfm*

cipher handle

*rdata*

output buffer holding the random numbers

*dlen*

length of the output buffer

## DESCRIPTION

This function fills the caller-allocated buffer with random numbers using the random number generator referenced by the cipher handle.

## RETURN

0 function was successful; \< 0 if an error occurred

## AUTHORS

**Stephan Mueller** \<smueller@chronox.de\>

Author.

**Marek Vasut** \<marek@denx.de\>

Author.

## COPYRIGHT
