utils.utils.hmac_sha256
Declaration
lua
utils.hmac_sha256(key, data)
Description
Calculate HMAC-SHA256.
Parameters
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
key | string | Required | — | Secret key |
data | string | Required | — | Data to sign |
Return Values
| Type | Description |
|---|---|
| string | 64-char hex HMAC-SHA256 |
Example
lua
local sig = utils.hmac_sha256("secret", "message")