HMAC

The HMAC function card hashes input text, together with a secret key, using a cryptographic hash algorithm.

The format of the resulting hash can be Base64, hex, or binary, depending on the specified output parameter.

Input

Field Definition Type Required
algorithm Select the cryptographic hash algorithm to use:
  • md5

  • sha1

  • sha256

  • sha384

  • sha512

Dropdown FALSE
key Text to use as the secret cryptographic key.

This key, along with the algorithm, is necessary to validate the hash.

String TRUE
data Text string to be hashed.

This function only supports UTF-8 strings. The input string can't include any decimal, hexadecimal, binary, or ASCII characters.

String TRUE
digest Select the output formatting for the resulting hash:
  • base64

  • hex

  • binary

Dropdown FALSE

Output

Field Definition Type
output Encoded string of your input data. String

You can use the result of the output field wherever text can be sent.

To validate the hash, you need the correct algorithm and secret key.

Example

Input

  • algorithm: sha256

  • key: my secret key

  • data: My secret message!

  • digest: base64

Output

  • qd83l7nEE4gBpuaueA+XtKFeZO99aV7IvGgsJ15qmyo=

Related topics

Functions in Workflows

Workflow elements