[][src]Module rust_sodium::crypto::auth::hmacsha512256

HMAC-SHA-512-256, i.e., the first 256 bits of HMAC-SHA-512. HMAC-SHA-512-256 is conjectured to meet the standard notion of unforgeability.

Structs

Key

Authentication Key

State

Authentication State

Tag

Authentication Tag

Constants

KEYBYTES

Number of bytes in a Key.

TAGBYTES

Number of bytes in a Tag.

Functions

authenticate

authenticate() authenticates a message m using a secret key k. The function returns an authenticator tag.

gen_key

gen_key() randomly generates a key for authentication

verify

verify() returns true if tag is a correct authenticator of message m under a secret key k. Otherwise it returns false.