Parameters
string
required
The data to authenticate.
string
required
The secret key.
string
required
The underlying hash algorithm.
Returns
string
The hex HMAC.
Example
Errors
Related
hash: an unkeyed digest.
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Compute a keyed HMAC.
crypt.hmac(data: string, key: string, algorithm: string) -> string
local mac = crypt.hmac("payload", secretKey, "sha256")
| Message | Condition |
|---|---|
a key and a data string are required | An argument was missing. |
unknown hash algorithm | The algorithm name was not recognized. |
the hmac provider returned an error | The provider could not compute the HMAC. |
hash: an unkeyed digest.