[repo] Workspace: one crate, forbid(unsafe), no-panic lints, RustCrypto picked; Error, Instant, RandomSource, SessionKeys
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
//! Randomness comes in from the caller, so every test is deterministic.
|
||||
|
||||
/// A source of random bytes supplied by the caller.
|
||||
///
|
||||
/// In production this must be a cryptographically secure generator (the OS generator). Tests pass a fixed,
|
||||
/// seeded source. DomiStream never reads randomness any other way: salts, challenges, secrets, the client key,
|
||||
/// `rikey`, ENet connect ids and PINs all come from here.
|
||||
pub trait RandomSource {
|
||||
/// Fills `dest` completely with random bytes.
|
||||
fn fill(&mut self, dest: &mut [u8]);
|
||||
}
|
||||
Reference in New Issue
Block a user