pub enum Algorithm {
Show 17 variants
HmacSha1,
HmacSha256,
HmacSha384,
HmacSha512,
HmacSha3_256,
HmacSha3_384,
HmacSha3_512,
HmacRipemd160,
CmacAes128,
CmacAes192,
CmacAes256,
CmacTripleDes,
Kmac128,
Kmac256,
GmacAes128,
GmacAes192,
GmacAes256,
}Expand description
MAC algorithm selector.
Variants§
HmacSha1
HMAC-SHA-1 (RFC 2104, FIPS 198-1). 20-byte tag. Legacy.
HmacSha256
HMAC-SHA-256. 32-byte tag.
HmacSha384
HMAC-SHA-384. 48-byte tag.
HmacSha512
HMAC-SHA-512. 64-byte tag.
HmacSha3_256
HMAC-SHA3-256. 32-byte tag.
HmacSha3_384
HMAC-SHA3-384. 48-byte tag.
HmacSha3_512
HMAC-SHA3-512. 64-byte tag.
HmacRipemd160
HMAC-RIPEMD-160. 20-byte tag. Legacy.
CmacAes128
CMAC-AES-128 (NIST SP 800-38B, RFC 4493). 16-byte tag, 16-byte key.
CmacAes192
CMAC-AES-192. 16-byte tag, 24-byte key.
CmacAes256
CMAC-AES-256. 16-byte tag, 32-byte key.
CmacTripleDes
CMAC-TripleDES (NIST SP 800-38B). 8-byte tag, 24-byte key. Legacy.
Kmac128
KMAC128 (FIPS SP 800-185). Default tag = 32 bytes (256 bits).
Kmac256
KMAC256 (FIPS SP 800-185). Default tag = 64 bytes (512 bits).
GmacAes128
GMAC-AES-128 (NIST SP 800-38D, GCM with empty plaintext). 16-byte tag. Requires a 12-byte unique nonce per message.
GmacAes192
GMAC-AES-192. 16-byte tag. Requires a 12-byte unique nonce per message.
GmacAes256
GMAC-AES-256. 16-byte tag. Requires a 12-byte unique nonce per message.