Skip to main content

Module hash

Module hash 

Source
Expand description

Hash functions, XOFs, and message-authentication helpers.

The in-tree hash families currently cover:

  • RFC 1321 (Md5)
  • FIPS 180-4 (Sha1, SHA-2)
  • FIPS 202 (Sha3_*, Shake*)
  • RIPEMD-160 (Ripemd160)
  • FIPS 198-1 / RFC 2104 (Hmac<H>)
  • RFC 5869 (Hkdf<H>)

The shared traits in this module are the glue that lets one keyed construction (Hmac<H>) work across multiple named hash families without reimplementing the HMAC state machine for each one.

Modules§

hkdf
HKDF (RFC 5869) over the crate’s digest/HMAC traits.
hmac
Hash-based Message Authentication Code (HMAC).
md5
MD5 from RFC 1321.
ripemd160
RIPEMD-160 from Dobbertin/Bosselaers/Preneel.
sha1
SHA-1 from FIPS 180-4.
sha2
SHA-2 family from FIPS 180-4.
sha3
SHA-3 (Keccak-f[1600]) from FIPS 202.

Traits§

Digest
Minimal trait for fixed-output hash functions that can back HMAC.
Xof
Minimal trait for extendable-output functions.