{
  "classes": [
    {
      "constants": [],
      "types": [],
      "name": "@eryx/crypto/hmac",
      "tags": [],
      "functions": [
        {
          "source": {
            "path": "",
            "line": 29
          },
          "is_method": false,
          "signature": "hmac.md5(\n    key: buffer,  -- Secret key (any length).\n    data: buffer  -- Input data.\n) → (\n    buffer  -- 16-byte MAC. \n)",
          "owner": "hmac",
          "desc": "Computes HMAC-MD5 over `data` with `key`.\n",
          "tags": [],
          "name": "md5",
          "return_str": "buffer",
          "function_type": "Function",
          "returns": [
            {
              "lua_type": "buffer",
              "desc": "16-byte MAC. "
            }
          ],
          "params": [
            {
              "lua_type": "buffer",
              "name": "key",
              "desc": "Secret key (any length)."
            },
            {
              "lua_type": "buffer",
              "name": "data",
              "desc": "Input data."
            }
          ]
        },
        {
          "source": {
            "path": "",
            "line": 40
          },
          "is_method": false,
          "signature": "hmac.sha1(\n    key: buffer,  -- Secret key (any length).\n    data: buffer  -- Input data.\n) → (\n    buffer  -- 20-byte MAC. \n)",
          "owner": "hmac",
          "desc": "Computes HMAC-SHA1 over `data` with `key`.\n",
          "tags": [],
          "name": "sha1",
          "return_str": "buffer",
          "function_type": "Function",
          "returns": [
            {
              "lua_type": "buffer",
              "desc": "20-byte MAC. "
            }
          ],
          "params": [
            {
              "lua_type": "buffer",
              "name": "key",
              "desc": "Secret key (any length)."
            },
            {
              "lua_type": "buffer",
              "name": "data",
              "desc": "Input data."
            }
          ]
        },
        {
          "source": {
            "path": "",
            "line": 51
          },
          "is_method": false,
          "signature": "hmac.sha224(\n    key: buffer,  -- Secret key (any length).\n    data: buffer  -- Input data.\n) → (\n    buffer  -- 28-byte MAC. \n)",
          "owner": "hmac",
          "desc": "Computes HMAC-SHA224 over `data` with `key`.\n",
          "tags": [],
          "name": "sha224",
          "return_str": "buffer",
          "function_type": "Function",
          "returns": [
            {
              "lua_type": "buffer",
              "desc": "28-byte MAC. "
            }
          ],
          "params": [
            {
              "lua_type": "buffer",
              "name": "key",
              "desc": "Secret key (any length)."
            },
            {
              "lua_type": "buffer",
              "name": "data",
              "desc": "Input data."
            }
          ]
        },
        {
          "source": {
            "path": "",
            "line": 65
          },
          "is_method": false,
          "signature": "hmac.sha256(\n    key: buffer,  -- Secret key (any length).\n    data: buffer  -- Input data.\n) → (\n    buffer  -- 32-byte MAC. \n)",
          "owner": "hmac",
          "desc": "Computes HMAC-SHA256 over `data` with `key`.\n\nThe most common HMAC variant. Suitable for API authentication,\nsigned cookies, and TOTP/HOTP tokens.\n",
          "tags": [],
          "name": "sha256",
          "return_str": "buffer",
          "function_type": "Function",
          "returns": [
            {
              "lua_type": "buffer",
              "desc": "32-byte MAC. "
            }
          ],
          "params": [
            {
              "lua_type": "buffer",
              "name": "key",
              "desc": "Secret key (any length)."
            },
            {
              "lua_type": "buffer",
              "name": "data",
              "desc": "Input data."
            }
          ]
        },
        {
          "source": {
            "path": "",
            "line": 76
          },
          "is_method": false,
          "signature": "hmac.sha384(\n    key: buffer,  -- Secret key (any length).\n    data: buffer  -- Input data.\n) → (\n    buffer  -- 48-byte MAC. \n)",
          "owner": "hmac",
          "desc": "Computes HMAC-SHA384 over `data` with `key`.\n",
          "tags": [],
          "name": "sha384",
          "return_str": "buffer",
          "function_type": "Function",
          "returns": [
            {
              "lua_type": "buffer",
              "desc": "48-byte MAC. "
            }
          ],
          "params": [
            {
              "lua_type": "buffer",
              "name": "key",
              "desc": "Secret key (any length)."
            },
            {
              "lua_type": "buffer",
              "name": "data",
              "desc": "Input data."
            }
          ]
        },
        {
          "source": {
            "path": "",
            "line": 87
          },
          "is_method": false,
          "signature": "hmac.sha512(\n    key: buffer,  -- Secret key (any length).\n    data: buffer  -- Input data.\n) → (\n    buffer  -- 64-byte MAC. \n)",
          "owner": "hmac",
          "desc": "Computes HMAC-SHA512 over `data` with `key`.\n",
          "tags": [],
          "name": "sha512",
          "return_str": "buffer",
          "function_type": "Function",
          "returns": [
            {
              "lua_type": "buffer",
              "desc": "64-byte MAC. "
            }
          ],
          "params": [
            {
              "lua_type": "buffer",
              "name": "key",
              "desc": "Secret key (any length)."
            },
            {
              "lua_type": "buffer",
              "name": "data",
              "desc": "Input data."
            }
          ]
        },
        {
          "source": {
            "path": "",
            "line": 98
          },
          "is_method": false,
          "signature": "hmac.sha3_224(\n    key: buffer,  -- Secret key (any length).\n    data: buffer  -- Input data.\n) → (\n    buffer  -- 28-byte MAC. \n)",
          "owner": "hmac",
          "desc": "Computes HMAC-SHA3-224 over `data` with `key`.\n",
          "tags": [],
          "name": "sha3_224",
          "return_str": "buffer",
          "function_type": "Function",
          "returns": [
            {
              "lua_type": "buffer",
              "desc": "28-byte MAC. "
            }
          ],
          "params": [
            {
              "lua_type": "buffer",
              "name": "key",
              "desc": "Secret key (any length)."
            },
            {
              "lua_type": "buffer",
              "name": "data",
              "desc": "Input data."
            }
          ]
        },
        {
          "source": {
            "path": "",
            "line": 109
          },
          "is_method": false,
          "signature": "hmac.sha3_256(\n    key: buffer,  -- Secret key (any length).\n    data: buffer  -- Input data.\n) → (\n    buffer  -- 32-byte MAC. \n)",
          "owner": "hmac",
          "desc": "Computes HMAC-SHA3-256 over `data` with `key`.\n",
          "tags": [],
          "name": "sha3_256",
          "return_str": "buffer",
          "function_type": "Function",
          "returns": [
            {
              "lua_type": "buffer",
              "desc": "32-byte MAC. "
            }
          ],
          "params": [
            {
              "lua_type": "buffer",
              "name": "key",
              "desc": "Secret key (any length)."
            },
            {
              "lua_type": "buffer",
              "name": "data",
              "desc": "Input data."
            }
          ]
        },
        {
          "source": {
            "path": "",
            "line": 120
          },
          "is_method": false,
          "signature": "hmac.sha3_384(\n    key: buffer,  -- Secret key (any length).\n    data: buffer  -- Input data.\n) → (\n    buffer  -- 48-byte MAC. \n)",
          "owner": "hmac",
          "desc": "Computes HMAC-SHA3-384 over `data` with `key`.\n",
          "tags": [],
          "name": "sha3_384",
          "return_str": "buffer",
          "function_type": "Function",
          "returns": [
            {
              "lua_type": "buffer",
              "desc": "48-byte MAC. "
            }
          ],
          "params": [
            {
              "lua_type": "buffer",
              "name": "key",
              "desc": "Secret key (any length)."
            },
            {
              "lua_type": "buffer",
              "name": "data",
              "desc": "Input data."
            }
          ]
        },
        {
          "source": {
            "path": "",
            "line": 131
          },
          "is_method": false,
          "signature": "hmac.sha3_512(\n    key: buffer,  -- Secret key (any length).\n    data: buffer  -- Input data.\n) → (\n    buffer  -- 64-byte MAC. \n)",
          "owner": "hmac",
          "desc": "Computes HMAC-SHA3-512 over `data` with `key`.\n",
          "tags": [],
          "name": "sha3_512",
          "return_str": "buffer",
          "function_type": "Function",
          "returns": [
            {
              "lua_type": "buffer",
              "desc": "64-byte MAC. "
            }
          ],
          "params": [
            {
              "lua_type": "buffer",
              "name": "key",
              "desc": "Secret key (any length)."
            },
            {
              "lua_type": "buffer",
              "name": "data",
              "desc": "Input data."
            }
          ]
        }
      ],
      "properties": [],
      "source": {
        "path": "",
        "line": 0
      },
      "desc": "HMAC (Hash-based Message Authentication Code).\n\nComputes an authentication tag over `data` using a secret `key` and the\nchosen hash algorithm. The output length equals the digest size of the\nunderlying hash.\n\n```luau\nlocal hmac = require(\"@eryx/crypto/hmac\")\nlocal hex  = require(\"@eryx/encoding/hex\")\n\nlocal key = buffer.fromstring(\"secret\")\nlocal msg = buffer.fromstring(\"hello\")\nprint(hex.encode(hmac.sha256(key, msg)))\n```\n"
    }
  ]
}