use wasip2::random;
pub fn get_random_bytes(buf: &mut [u8]) {
match buf.len() {
0 => {}
_ => {
let output = random::random::get_random_bytes(buf.len() as u64);
buf.copy_from_slice(&output[..]);
}
}
}
pub fn get_insecure_random_bytes(buf: &mut [u8]) {
match buf.len() {
0 => {}
_ => {
let output = random::insecure::get_insecure_random_bytes(buf.len() as u64);
buf.copy_from_slice(&output[..]);
}
}
}