[go: up one dir, main page]

Function cprng_draw

Source
pub fn cprng_draw(buffer: &mut [u8]) -> Result<usize, Status>
Expand description

Draw random bytes from the kernel’s CPRNG to fill the given buffer. Returns the actual number of bytes drawn, which may sometimes be less than the size of the buffer provided.

The buffer must have length less than ZX_CPRNG_DRAW_MAX_LEN.

Wraps the zx_cprng_draw syscall.