%dw 2.0
import dw::Crypto
output application/json
---
{
"HMACBinary" : Crypto::HMACBinary("confidential" as Binary, "xxxxx" as Binary, "HmacSHA512")
}
DataWeave
HMACBinary
HMACBinary(Binary, Binary, String): Binary
Computes an HMAC hash (with a secret cryptographic key) on input content.
See also, HMACWith
.
Parameters
Name | Description |
---|---|
|
The secret cryptographic key (a |
|
The input content, a |
|
The hashing algorithm. |
Example
This example uses HMAC with a secret value to encrypt the input content.
Source
Output
{
"HMACBinary": "^\tXƐ\f\ufffd\ufffd\ufffdӞ]\ufffdd\ufffd\ufffd\u001b\u0003\ufffd\tL\ufffd\ufffdr#\ufffd\ufffdc\ufffd\u001bl\ufffd-q\ufffd\u001bؐ+\ufffd\u001d*M\ufffdz\ufffd\u0012&\ufffd&\ufffd\ufffdd\ufffd\ufffd̷R\u0003qO\ufffdF"
}
JSON