1 2 3 4 5 6 7 8 9 10 11 12
pub use solana_program::hash::*; /// random hash value for tests and benchmarks. #[cfg(feature = "full")] pub fn new_rand<R: ?Sized>(rng: &mut R) -> Hash where R: rand::Rng, { let mut buf = [0u8; HASH_BYTES]; rng.fill(&mut buf); Hash::new(&buf) }