Skip to main content

calculate_sha256

Function calculate_sha256 

Source
pub fn calculate_sha256(content: &[u8]) -> String
Expand description

Calculate the SHA256 hash of content and return it as a 64-character lowercase hex string (the standard hex encoding of the 32-byte digest).

Use this helper whenever a caller needs a stable, ASCII-safe fingerprint of arbitrary bytes - for example, hashing file contents for change detection, config fingerprints, or cache keys.