Digest¶
Produces a hash from the chunks of input. Feed the input with append() and produce a final hash from the concatenation of the input with final().
Constructors¶
md5¶
Use the MD5 algorithm to calculate the hash.
Returns¶
- Digest ref^
ripemd160¶
Use the RIPEMD160 algorithm to calculate the hash.
Returns¶
- Digest ref^
sha1¶
Use the SHA1 algorithm to calculate the hash.
Returns¶
- Digest ref^
sha224¶
Use the SHA256 algorithm to calculate the hash.
Returns¶
- Digest ref^
sha256¶
Use the SHA256 algorithm to calculate the hash.
Returns¶
- Digest ref^
sha384¶
Use the SHA384 algorithm to calculate the hash.
Returns¶
- Digest ref^
sha512¶
Use the SHA512 algorithm to calculate the hash.
Returns¶
- Digest ref^
shake128¶
Use the SHAKE128 algorithm to calculate the hash.
SHAKE128 is an extendable output function (XOF) that can produce
variable-length output. The size' parameter controls the output length
in bytes (default: 16). Variable-length output requires OpenSSL 3.0.x;
on OpenSSL 1.1.x, the default size is always used.
Parameters¶
- size': USize val = 16
Returns¶
- Digest ref^
shake256¶
Use the SHAKE256 algorithm to calculate the hash.
SHAKE256 is an extendable output function (XOF) that can produce
variable-length output. The size' parameter controls the output length
in bytes (default: 32). Variable-length output requires OpenSSL 3.0.x;
on OpenSSL 1.1.x, the default size is always used.
Parameters¶
- size': USize val = 32
Returns¶
- Digest ref^
Public Functions¶
append¶
Update the Digest object with input. Throw an error if final() has been called.
Parameters¶
Returns¶
- None val ?
final¶
Return the digest of the strings passed to the append() method.
Returns¶
digest_size¶
Return the size of the message digest in bytes.
Returns¶
- USize val