> ## Documentation Index
> Fetch the complete documentation index at: https://docs.projectreal.gg/llms.txt
> Use this file to discover all available pages before exploring further.

# crypt.hash

> Faz hash dos bytes de uma string Lua com um algoritmo crypto library hash suportado e retorna um lowercase hexadecimal digest.

<div className="real-function-page">
  ```lua theme={null}
  crypt.hash(data: string, algorithm?: "sha256" | "sha1" | "sha224" | "sha384" | "sha512" | "md5" | "sha3-224" | "sha3-256" | "sha3-384" | "sha3-512"): string
  ```

  ## Argumentos

  <ParamField path={"data"} type={"string"} required>
    Bytes da string Lua passados para crypto library HashFilter.
  </ParamField>

  <ParamField path={"algorithm"} type={"\"sha256\" | \"sha1\" | \"sha224\" | \"sha384\" | \"sha512\" | \"md5\" | \"sha3-224\" | \"sha3-256\" | \"sha3-384\" | \"sha3-512\""}>
    Nome do algoritmo hash case-sensitive. O padrao e sha256.
  </ParamField>

  ## Retornos

  <ResponseField name={"digest"} type={"string"}>
    Lowercase hexadecimal digest sem prefix ou separators.
  </ResponseField>

  ## Exemplo

  Faca hash dos bytes de uma string Lua com o algoritmo padrao ou um nome suportado explicito.

  ```lua theme={null}
  local defaultDigest = crypt.hash("hello world")
  local sha3Digest = crypt.hash("hello world", "sha3-256")

  print(defaultDigest)
  print(sha3Digest)
  ```
</div>
