Skip to main content

bitwarden_crypto_primitives/rustcrypto/
random.rs

1use rand::TryRng;
2
3/// Fills `dst` from the OS CSPRNG.
4pub(crate) fn fill_bytes(dst: &mut [u8]) {
5    rand::rngs::SysRng
6        .try_fill_bytes(dst)
7        .expect("system RNG must not fail");
8}