Contact Free trial Login

HMACWith

HMACWith(Binary, Binary): String

Computes an HMAC hash (with a secret cryptographic key) on input content, then transforms the result into a lowercase, hexadecimal string.

See also, HMACBinary.

Parameters

Name Description

content

The input content, a Binary value.

secret

The secret cryptographic key (a Binary) used when encrypting the content).

Example

This example uses HMAC with a secret value to encrypt the input content.

Source

%dw 2.0
import dw::Crypto
output application/json
---
{ "HMACWith" : Crypto::HMACWith("key_re_loca" as Binary, "xxxxx" as Binary) }

Output

{ "HMACWith": "2e2da2e51286db8afa9900f51218529cda3dd32a" }