#[non_exhaustive]pub enum Algorithm {
Sha1,
Sha256,
Sha224,
Sha512,
Sha384,
Md5,
Passthrough,
}Expand description
The digest function used to turn the canonical form into a digest.
The default is SHA-1, which is what the reference package uses when no algorithm is named. The others are here so a digest can match a system that already speaks one of them.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Sha1
SHA-1, 40 hexadecimal characters. The reference’s default.
Sha256
SHA-256, 64 hexadecimal characters.
Sha224
SHA-224, 56 hexadecimal characters.
Sha512
SHA-512, 128 hexadecimal characters.
Sha384
SHA-384, 96 hexadecimal characters.
Md5
MD5, 32 hexadecimal characters.
Passthrough
No digest: the canonical form is returned as it stands.
This is the reference’s passthrough, and it is what it uses internally
to write the byte stream it hashes. It is here so a caller can see those
bytes, which is the same string canonical returns; unlike the digests,
the text form is not a hex or base64 rendering of something else.