use sha2::{Digest, Sha256}; pub(crate) fn sha256_hex(parts: impl IntoIterator) -> String { let mut hasher = Sha256::new(); hasher.update(b"crank-config-fingerprint-v1\0"); for part in parts { hasher.update(part.len().to_le_bytes()); hasher.update(part.as_bytes()); } format!("{:x}", hasher.finalize()) }