use sha2::{Digest, Sha512}; /// Compute hash of a slice of bytes pub fn sha512(bytes: &[u8]) -> String { let mut hasher = Sha512::new(); hasher.update(bytes); let h = hasher.finalize(); format!("{:x}", h) }