mx_cprng_draw - Draw from the kernel's CPRNG
#include <magenta/syscalls.h>
mx_status_t mx_cprng_draw(void* buffer, size_t len, size_t* actual);
mx_cprng_draw() draws random bytes from the kernel CPRNG. This data should be suitable for cryptographic applications. It will return at most MX_CPRNG_DRAW_MAX_LEN bytes at a time.
mx_cprng_draw() returns NO_ERROR and the number of random bytes drawn into buffer (via *actual) on success.
ERR_INVALID_ARGS len is too large.
ERR_INVALID_ARGS buffer is not a valid user space pointer.
There are no other error conditions. If its arguments are valid, mx_cprng_draw() will succeed.
This syscall should be rate-limited.