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:
- Step Parameters
- Message Parameters
Default: KEY
SIGNATURE_PARAM
Message parameter name that receives the generated HMAC signature.
Direction: Out
Default: SIGNATURE
Execution Context Behavior
- Reads text from TEXT_PARAM.
- Resolves the secret key from KEY_PARAM.
- Converts text to bytes using TEXT_ENCODING.
- Converts the key to bytes using KEY_ENCODING.
- Generates an HMAC using SHA-256.
- Encodes the signature using SIGNATURE_ENCODING.
- Writes the result to SIGNATURE_PARAM.
Example Configuration
| Parameter | Value |
|---|---|
| KEY | my-secret-key |
| TEXT_ENCODING | utf8 |
| KEY_ENCODING | utf8 |
| SIGNATURE_ENCODING | base64 |
| TEXT_PARAM | TEXT |
| KEY_PARAM | KEY |
| SIGNATURE_PARAM | SIGNATURE |
Example Result
SIGNATURE = [base64 hmac signature]