1 2 3 4 5 6 7 8 9 10 11 12
//! Content hashes for the tick and append guards. use sha2::{Digest, Sha256}; /// Lowercase hex SHA-256 of `bytes`. #[must_use] pub fn sha256_hex(bytes: &[u8]) -> String { Sha256::digest(bytes) .iter() .map(|b| format!("{b:02x}")) .collect() }