[Crypto]DigestabstractOne-shot cryptographic digests (and MD5, kept with the hashes despite being broken for security use). Each method hashes a String's UTF-8 bytes or a Bytes value and answers the raw digest as Bytes — toHex for the usual text form, Base64.encode: for wire formats.
([Crypto]Digest.sha256:'abc').toHex.starts?:'ba7816bf' "* -> true
The BLAKE3 digest (32 bytes) — the modern fast one.
([Crypto]Digest.blake3:'abc').count "* -> 32
The MD5 digest (16 bytes). Not cryptography anymore — checksums and legacy interop only.
([Crypto]Digest.md5:'abc').count "* -> 16
The SHA-1 digest (20 bytes). Broken for collision resistance — for legacy interop (git object ids, old protocols), not for new designs.
([Crypto]Digest.sha1:'abc').count "* -> 20
The SHA-256 digest (32 bytes).
([Crypto]Digest.sha256:'abc').count "* -> 32
The SHA-512 digest (64 bytes).
([Crypto]Digest.sha512:'abc').count "* -> 64