Function fuchsia_zircon::cprng_draw [] [src]

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

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.