{
  "classes": [
    {
      "constants": [],
      "types": [],
      "name": "@eryx/crypto/hash",
      "tags": [],
      "functions": [
        {
          "source": {
            "path": "",
            "line": 29
          },
          "is_method": false,
          "signature": "hash.md5(\n    data: buffer  -- Input data.\n) → (\n    buffer  -- 16-byte (128-bit) digest. \n)",
          "owner": "hash",
          "desc": "Computes the MD5 digest of `data`.\n\nMD5 is considered cryptographically broken. Use it only for\nnon-security purposes such as checksums or legacy compatibility.\n",
          "tags": [],
          "name": "md5",
          "return_str": "buffer",
          "function_type": "Function",
          "returns": [
            {
              "lua_type": "buffer",
              "desc": "16-byte (128-bit) digest. "
            }
          ],
          "params": [
            {
              "lua_type": "buffer",
              "name": "data",
              "desc": "Input data."
            }
          ]
        },
        {
          "source": {
            "path": "",
            "line": 42
          },
          "is_method": false,
          "signature": "hash.sha1(\n    data: buffer  -- Input data.\n) → (\n    buffer  -- 20-byte (160-bit) digest. \n)",
          "owner": "hash",
          "desc": "Computes the SHA-1 digest of `data`.\n\nSHA-1 is deprecated for security-critical uses. Prefer SHA-256 or\nSHA-3 for new designs.\n",
          "tags": [],
          "name": "sha1",
          "return_str": "buffer",
          "function_type": "Function",
          "returns": [
            {
              "lua_type": "buffer",
              "desc": "20-byte (160-bit) digest. "
            }
          ],
          "params": [
            {
              "lua_type": "buffer",
              "name": "data",
              "desc": "Input data."
            }
          ]
        },
        {
          "source": {
            "path": "",
            "line": 52
          },
          "is_method": false,
          "signature": "hash.sha224(\n    data: buffer  -- Input data.\n) → (\n    buffer  -- 28-byte (224-bit) digest. \n)",
          "owner": "hash",
          "desc": "Computes the SHA-224 digest of `data`.\n",
          "tags": [],
          "name": "sha224",
          "return_str": "buffer",
          "function_type": "Function",
          "returns": [
            {
              "lua_type": "buffer",
              "desc": "28-byte (224-bit) digest. "
            }
          ],
          "params": [
            {
              "lua_type": "buffer",
              "name": "data",
              "desc": "Input data."
            }
          ]
        },
        {
          "source": {
            "path": "",
            "line": 65
          },
          "is_method": false,
          "signature": "hash.sha256(\n    data: buffer  -- Input data.\n) → (\n    buffer  -- 32-byte (256-bit) digest. \n)",
          "owner": "hash",
          "desc": "Computes the SHA-256 digest of `data`.\n\nThe most widely deployed secure hash. Suitable for signatures,\nHMACs, key derivation, and general-purpose integrity checking.\n",
          "tags": [],
          "name": "sha256",
          "return_str": "buffer",
          "function_type": "Function",
          "returns": [
            {
              "lua_type": "buffer",
              "desc": "32-byte (256-bit) digest. "
            }
          ],
          "params": [
            {
              "lua_type": "buffer",
              "name": "data",
              "desc": "Input data."
            }
          ]
        },
        {
          "source": {
            "path": "",
            "line": 75
          },
          "is_method": false,
          "signature": "hash.sha384(\n    data: buffer  -- Input data.\n) → (\n    buffer  -- 48-byte (384-bit) digest. \n)",
          "owner": "hash",
          "desc": "Computes the SHA-384 digest of `data`.\n",
          "tags": [],
          "name": "sha384",
          "return_str": "buffer",
          "function_type": "Function",
          "returns": [
            {
              "lua_type": "buffer",
              "desc": "48-byte (384-bit) digest. "
            }
          ],
          "params": [
            {
              "lua_type": "buffer",
              "name": "data",
              "desc": "Input data."
            }
          ]
        },
        {
          "source": {
            "path": "",
            "line": 88
          },
          "is_method": false,
          "signature": "hash.sha512(\n    data: buffer  -- Input data.\n) → (\n    buffer  -- 64-byte (512-bit) digest. \n)",
          "owner": "hash",
          "desc": "Computes the SHA-512 digest of `data`.\n\nProvides 512-bit security strength. Preferred over SHA-256 when\noutput size matters less than collision resistance.\n",
          "tags": [],
          "name": "sha512",
          "return_str": "buffer",
          "function_type": "Function",
          "returns": [
            {
              "lua_type": "buffer",
              "desc": "64-byte (512-bit) digest. "
            }
          ],
          "params": [
            {
              "lua_type": "buffer",
              "name": "data",
              "desc": "Input data."
            }
          ]
        },
        {
          "source": {
            "path": "",
            "line": 101
          },
          "is_method": false,
          "signature": "hash.sha3_224(\n    data: buffer  -- Input data.\n) → (\n    buffer  -- 28-byte (224-bit) digest. \n)",
          "owner": "hash",
          "desc": "Computes the SHA3-224 digest of `data`.\n\nSHA-3 is based on the Keccak sponge construction, an entirely\ndifferent design from SHA-2. Resistant to length-extension attacks.\n",
          "tags": [],
          "name": "sha3_224",
          "return_str": "buffer",
          "function_type": "Function",
          "returns": [
            {
              "lua_type": "buffer",
              "desc": "28-byte (224-bit) digest. "
            }
          ],
          "params": [
            {
              "lua_type": "buffer",
              "name": "data",
              "desc": "Input data."
            }
          ]
        },
        {
          "source": {
            "path": "",
            "line": 111
          },
          "is_method": false,
          "signature": "hash.sha3_256(\n    data: buffer  -- Input data.\n) → (\n    buffer  -- 32-byte (256-bit) digest. \n)",
          "owner": "hash",
          "desc": "Computes the SHA3-256 digest of `data`.\n",
          "tags": [],
          "name": "sha3_256",
          "return_str": "buffer",
          "function_type": "Function",
          "returns": [
            {
              "lua_type": "buffer",
              "desc": "32-byte (256-bit) digest. "
            }
          ],
          "params": [
            {
              "lua_type": "buffer",
              "name": "data",
              "desc": "Input data."
            }
          ]
        },
        {
          "source": {
            "path": "",
            "line": 121
          },
          "is_method": false,
          "signature": "hash.sha3_384(\n    data: buffer  -- Input data.\n) → (\n    buffer  -- 48-byte (384-bit) digest. \n)",
          "owner": "hash",
          "desc": "Computes the SHA3-384 digest of `data`.\n",
          "tags": [],
          "name": "sha3_384",
          "return_str": "buffer",
          "function_type": "Function",
          "returns": [
            {
              "lua_type": "buffer",
              "desc": "48-byte (384-bit) digest. "
            }
          ],
          "params": [
            {
              "lua_type": "buffer",
              "name": "data",
              "desc": "Input data."
            }
          ]
        },
        {
          "source": {
            "path": "",
            "line": 131
          },
          "is_method": false,
          "signature": "hash.sha3_512(\n    data: buffer  -- Input data.\n) → (\n    buffer  -- 64-byte (512-bit) digest. \n)",
          "owner": "hash",
          "desc": "Computes the SHA3-512 digest of `data`.\n",
          "tags": [],
          "name": "sha3_512",
          "return_str": "buffer",
          "function_type": "Function",
          "returns": [
            {
              "lua_type": "buffer",
              "desc": "64-byte (512-bit) digest. "
            }
          ],
          "params": [
            {
              "lua_type": "buffer",
              "name": "data",
              "desc": "Input data."
            }
          ]
        }
      ],
      "properties": [],
      "source": {
        "path": "",
        "line": 0
      },
      "desc": "Cryptographic hash functions.\n\nAll functions take a `buffer` and return the raw digest as a `buffer`.\nFor hex output, pipe through `@eryx/encoding/hex`.\n\n```luau\nlocal hash = require(\"@eryx/crypto/hash\")\nlocal hex  = require(\"@eryx/encoding/hex\")\n\nprint(hex.encode(hash.sha256(buffer.fromstring(\"hello\"))))\n-- \"2cf24dba5fb0a30e26e83b2ac5b9e29e1b161e5c1fa7425e73043362938b9824\"\n```\n"
    }
  ]
}