security.sha256HmacHex
Generate a SHA256 HMAC hash, returned as a hex-encoded string.
js
security.sha256HmacHex(secret, value)Parameters
| Parameter | Type | Description |
|---|---|---|
secret | string | Secret to hash value. |
value | string | Value to hash. |
Returns
stringExamples
js
const hash = security.sha256HmacHex("mySecret", "Hello"); // "c1727e0f30b8af5e4c571ff0d22d0f5decc63018f2d6e376ac16dc04d06e482c"