pub fn encode_multihash(algo: HashAlgo, digest: &[u8]) -> Result<Vec<u8>>Expand description
Encode a digest as a multihash: uvarint(algo) || uvarint(len) || digest.
The digest length is checked against the lengths supported by the algorithm: sha1=20, sha2-256=32, and blake3=32 or 64.