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

content

The input content, a Binary value.

secret

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

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*" }