pub fn random_bytes(path: &Path, n: usize, seed: u64) -> Result<()>Expand description
Write n deterministic bytes to path using a splitmix64-derived
stream seeded by seed.
ยงExample
use dev_fixtures::adversarial::random_bytes;
let dir = tempfile::tempdir().unwrap();
let path = dir.path().join("rand.bin");
random_bytes(&path, 32, 42).unwrap();
let a = std::fs::read(&path).unwrap();
random_bytes(&path, 32, 42).unwrap();
let b = std::fs::read(&path).unwrap();
assert_eq!(a, b); // deterministic from seed