pub fn encode_hash(
algorithm: &str,
encoding: &str,
bytes: &[u8],
) -> Result<String, SpecError>Expand description
Re-encode a hash to the requested encoding. algorithm is
stamped into the output for prefixed encodings (<alg>:<...>
or SRI).
§Errors
SpecError::Interp { phase: "hash-encode" } if the encoding
name isn’t recognised.