[repo] Workspace: one crate, forbid(unsafe), no-panic lints, RustCrypto picked; Error, Instant, RandomSource, SessionKeys

This commit is contained in:
2026-11-25 11:45:23 +01:00
parent 184f4024c7
commit cb8e7ed4c3
9 changed files with 854 additions and 0 deletions
+11
View File
@@ -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]);
}