Module algorithm

Source
Expand description

Hash-based Message Authentication Code (HMAC) functionality.

Structs§

Error
Represents errors that occur when unknown algorithms are encountered.

Enums§

Algorithm
Represents hash algorithms used in HMACs.

Constants§

HMAC_ANY_KEY_LENGTH
HMAC accepts any key length.
SHA1
The SHA1 literal.
SHA1_LENGTH
The length of the SHA-1 hash.
SHA256sha2
The SHA256 literal.
SHA512sha2
The SHA512 literal.
SHA256_LENGTHsha2
The length of the SHA-256 hash.
SHA512_LENGTHsha2
The length of the SHA-512 hash.

Functions§

hmac
Computes the HMAC of the given data.
hmac_sha1
Computes the HMAC using the SHA-1 algorithm.
hmac_sha256sha2
Computes the HMAC using the SHA-256 algorithm.
hmac_sha512sha2
Computes the HMAC using the SHA-512 algorithm.
new_hmac_sha1
Creates HMAC using the SHA-1 algorithm.
new_hmac_sha256sha2
Creates HMAC using the SHA-256 algorithm.
new_hmac_sha512sha2
Creates HMAC using the SHA-512 algorithm.

Type Aliases§

HmacSha1
HMAC type using SHA-1.
HmacSha256sha2
HMAC type using SHA-256.
HmacSha512sha2
HMAC type using SHA-512.