1# zx_cprng_draw
2
3## NAME
4
5<!-- Updated by update-docs-from-abigen, do not edit. -->
6
7cprng_draw - Draw from the kernel's CPRNG
8
9## SYNOPSIS
10
11<!-- Updated by update-docs-from-abigen, do not edit. -->
12
13```
14#include <zircon/syscalls.h>
15
16void zx_cprng_draw(void* buffer, size_t buffer_size);
17```
18
19## DESCRIPTION
20
21`zx_cprng_draw()` draws random bytes from the kernel CPRNG.  This data should
22be suitable for cryptographic applications.
23
24Clients that require a large volume of randomness should consider using these
25bytes to seed a user-space random number generator for better performance.
26
27## RIGHTS
28
29<!-- Updated by update-docs-from-abigen, do not edit. -->
30
31TODO(ZX-2399)
32
33## NOTES
34
35`zx_cprng_draw()` triggers terminates the calling process if **buffer** is not
36a valid userspace pointer.
37
38There are no other error conditions.  If its arguments are valid,
39`zx_cprng_draw()` will succeed.
40