Contact Free trial Login

HMACBinary

HMACBinary(Binary, Binary, String): Binary

Computes an HMAC hash (with a secret cryptographic key) on input content.

See also, HMACWith.

Parameters

Name Description

secret

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

content

The input content, a Binary value.

algorithm

The hashing algorithm. By default HmacSHA1 is used.

Example

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

Source

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

Output

{ "HMACBinary": ".-\ufffd\ufffd\u0012\ufffdۊ\ufffd\ufffd\u0000\ufffd\u0012\u0018R\ufffd\ufffd=\ufffd*" }

We use cookies to make interactions with our websites and services easy and meaningful, to better understand how they are used and to tailor advertising. You can read more and make your cookie choices here. By continuing to use this site you are giving us your consent to do this.