Skip to main content

sha256_prefixed

Function sha256_prefixed 

pub fn sha256_prefixed(parts: &[&str]) -> String
Expand description

SHA-256 the parts joined by a single | byte and return the digest as "sha256:<lowercase-hex>".

The | separator sits between parts only — no leading or trailing separator — so ["a", "b"] hashes a|b. Callers that fingerprint an optional field stringify it first (an absent value becomes an empty part).