security.sha256hmac
Generate a SHA256 HMAC hash.
js
security.sha256hmac(secret, value)Parameters
| Parameter | Type | Description |
|---|---|---|
secret | string | Secret to hash value. |
value | string | Value to hash. |
Returns
stringExamples
js
const hash = security.sha256hmac("mySecret", "Hello"); // "wXJ+DzC4r15MVx/w0i0PXezGMBjy1uN2rBbcBNBuSCw="