Help Centre › Functions & Formulas
This article describes the RPA Crypto functionality to compute an HMAC signature.
For a full list of available functions, please read CRYPTO functions.
Description
The HMAC function computes a Hash-based Message Authentication Code using a secret key. HMAC is commonly used for webhook signature verification and API authentication.
Setting it up
To use the HMAC function, follow these instructions:
{{popups:rpas/add:action=crypto-hmac}}
Once on a process map:
- Navigate to the process where you would like to add the HMAC function
- Click on the green button’s drop-down (right side of the green button labelled “Process”)
- On the menu that appears, click on the “+ Activity” item
- From here you can select the CRYPTO HMAC option
- Click "Add" once you are done
Input parameters
| Parameter | Required | Type | Default | Description |
|---|---|---|---|---|
| Text | Yes | Text | - | The text to compute the HMAC for |
| Key | Yes | Text | - | The secret key for HMAC computation |
| Algorithm | No | Select | sha256 | Hash algorithm: sha256, sha512, sha1, or md5 |
| Variable | No | Text | hmac | Variable name to store the HMAC signature |
Output variables
| Variable | Type | Description |
|---|---|---|
| {hmac} | String | The hexadecimal HMAC signature |
Errors
This action does not produce errors.
Tips
- Use HMAC for webhook signature verification (e.g. GitHub, Stripe, Slack)
- Always use SHA-256 or SHA-512 for new integrations