Function hermit_abi::read_entropy

source ·
pub unsafe extern "C" fn read_entropy(
    buf: *mut u8,
    len: usize,
    flags: u32
) -> isize
Expand description

Fill len bytes in buf with cryptographically secure random data.

Returns either the number of bytes written to buf (a positive value) or

  • -EINVAL if flags contains unknown flags.
  • -ENOSYS if the system does not support random data generation.