updated zircon-syscall's commits
@@ -2,14 +2,12 @@ use super::*;
/// Draw random bytes from the kernel CPRNG.
/// This data should be suitable for cryptographic applications.
-
-Clients that require a large volume of randomness should consider using these bytes to seed a user-space random number generator for better performance.
+/// > Clients that require a large volume of randomness should consider using these bytes to seed a user-space random number generator for better performance.
impl Syscall<'_> {
pub fn sys_cprng_draw_once(&self, mut buf: UserOutPtr<u8>, len: usize) -> ZxResult {
info!("cprng_draw_once: buf=({:?}; {:?})", buf, len);
let mut res = vec![0u8; len];
- /// Fill random bytes to the buffer
- kernel_hal::fill_random(&mut res);
+ kernel_hal::fill_random(&mut res);// Fill random bytes to the buffer
buf.write_array(&res)?;
Ok(())
}
