use crate::rt::{MaybeSend, MaybeSync};
pub trait NonceSource: MaybeSend + MaybeSync {
fn fill(&self, nonce: &mut [u8; 32]) -> bool;
}
#[derive(Debug, Clone, Copy, Default)]
pub struct OsNonces;
impl NonceSource for OsNonces {
fn fill(&self, nonce: &mut [u8; 32]) -> bool {
getrandom::fill(nonce).is_ok()
}
}