pub trait NonceSource {
// Required method
fn fill(&self, out: &mut [u8]);
}Expand description
Per-kind nonce generator. Production uses OsNonceSource (the
getrandom syscall wrapper baked into the AEAD crates). Tests plug
in a fixed value for bit-identical fixtures.
Required Methods§
Sourcefn fill(&self, out: &mut [u8])
fn fill(&self, out: &mut [u8])
Fill out with len fresh nonce bytes. len matches
NonceBytes::expected_len for the active AEAD kind; panics /
short writes are illegal — return an error via the caller’s
wrapper if needed.