apoc v0.1.2 Apoc.MAC.HMAC View Source

Implementation of the HMAC construction as described in FIPS PUB 198-1

Link to this section Summary

Functions

Generate the HMAC signature for the given message on the key. This function only returns the Base16 (hex) encoding of the signature and does not encode the plaintext at all (unlike Plug.Crypto.MessageVerifier which includes the plaintext in the encoded return value)

Link to this section Types

Link to this section Functions

Link to this function sign(message, key, opts \\ []) View Source

Generate the HMAC signature for the given message on the key. This function only returns the Base16 (hex) encoding of the signature and does not encode the plaintext at all (unlike Plug.Crypto.MessageVerifier which includes the plaintext in the encoded return value)

SHA256 is used as the Hash function and as such a 32 byte (256 bit) key is recommended.

Link to this function sign_hex(message, key, opts \\ []) View Source
Link to this function verify(tag, message, key, opts \\ []) View Source