The GenerateHMAC action applies an HMAC hash to a given input.

The following table shows the parameters for the GenerateHMAC action.

Table 1. GenerateHMAC action parameters
Name Data type Required Notes
algorithm Enumeration Yes Possible values:
  • MD5
  • SHA1
  • SHA256
  • SHA512
secretKey String Yes The secret to use.
message String Yes The input message to process.
saveFormat String Yes Possible values:
  • BASE64
  • HEX
savePath JPath Yes The location to store the result.

XML Example

This action generates an HMAC hash of the value stored in the State at /value . The hash is generated in hex format by using the SHA1 algorithm and the provided secretKey, and is saved in the State at location /signature.

<GenerateHMAC algorithm="SHA1" secretKey="${/secret_key}" message="${/value}" saveFormat="HEX" savePath="/signature" />