Skip to main content

HMAC Sign Data

HMAC Sign Data generates a Hash-based Message Authentication Code (HMAC) for the provided input text using a shared secret key.

The generated signature ensures data integrity and authenticity.


Parameters

KEY

Secret key used to generate the HMAC signature.

The key may be provided either:

  • As a step parameter
  • As a message parameter (based on KEY_PARAM)

Required


TEXT_ENCODING

Encoding used to convert input text into bytes before signing.

Supported values:

  • utf8
  • unicode
  • ascii
  • base64

Default: utf8


KEY_ENCODING

Encoding used to convert the secret key into bytes.

Supported values:

  • utf8
  • base64
  • hex

Default: utf8


SIGNATURE_ENCODING

Encoding used to convert the generated HMAC bytes into string output.

Supported values:

  • base64 (recommended)
  • hex

Default: base64


TEXT_PARAM

Message parameter name that contains the input text to be signed.

Default: TEXT


KEY_PARAM

Parameter name used to resolve the secret key.

The key is resolved in the following order:

  1. Step Parameters
  2. Message Parameters

Default: KEY


SIGNATURE_PARAM

Message parameter name that receives the generated HMAC signature.

Direction: Out
Default: SIGNATURE


Execution Context Behavior

  1. Reads text from TEXT_PARAM.
  2. Resolves the secret key from KEY_PARAM.
  3. Converts text to bytes using TEXT_ENCODING.
  4. Converts the key to bytes using KEY_ENCODING.
  5. Generates an HMAC using SHA-256.
  6. Encodes the signature using SIGNATURE_ENCODING.
  7. Writes the result to SIGNATURE_PARAM.

Example Configuration

ParameterValue
KEYmy-secret-key
TEXT_ENCODINGutf8
KEY_ENCODINGutf8
SIGNATURE_ENCODINGbase64
TEXT_PARAMTEXT
KEY_PARAMKEY
SIGNATURE_PARAMSIGNATURE

Example Result

SIGNATURE = [base64 hmac signature]