HMAC

The HMAC function card encrypts input text and returns the resulting encrypted text, accepting any HMAC algorithm specified by OpenSSL.

Input

Field Definition Type Required
algorithm OpenSSL encryption algorithms; options are:
  • md5

  • sha1

  • sha256

  • sha384

  • sha512

Dropdown FALSE
key Text to use as the decryption key; this must be the same key, along with the algorithm, that you used to decrypt. String TRUE
data Encoded text to encrypt.

Only UTF-8 strings are supported. Input string cannot include decimal, binary, hexadecimal, or ASCII characters.

String TRUE
digest Digest module used for the encryption; options are base64, hex, and binary. Dropdown FALSE

Output

Field Definition Type
output Encoding of your input data. String

Example

If algorithm is sha256, key is my secret key, data is My secret message!, and digest is base64,

then output is thNnmggU2ex3L5XXeMNfxf8Wl8STcVZTxscSFEKSxa0=.

The value of the output field can be sent wherever text can be sent. In order to decipher it, you will need to have the correct algorithm and key.

Related topics

Functions in Workflows

About the elements of Okta Workflows