Skip to content

security.sha256hmac ​

Generate a SHA256 HMAC hash.

js
security.sha256hmac(secret, value)

Parameters ​

ParameterTypeDescription
secretstringSecret to hash value.
valuestringValue to hash.

Returns ​

string

Examples ​

js
const hash = security.sha256hmac("mySecret", "Hello"); // "wXJ+DzC4r15MVx/w0i0PXezGMBjy1uN2rBbcBNBuSCw="