> ## 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

> 지원되는 crypto library hash 알고리즘으로 Lua string 바이트를 해시하고 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
  ```

  ## 인수

  <ParamField path={"data"} type={"string"} required>
    crypto library HashFilter에 전달되는 Lua string 바이트입니다.
  </ParamField>

  <ParamField path={"algorithm"} type={"\"sha256\" | \"sha1\" | \"sha224\" | \"sha384\" | \"sha512\" | \"md5\" | \"sha3-224\" | \"sha3-256\" | \"sha3-384\" | \"sha3-512\""}>
    Case-sensitive hash 알고리즘 이름입니다. 기본값은 sha256입니다.
  </ParamField>

  ## 반환값

  <ResponseField name={"digest"} type={"string"}>
    prefix 또는 separators가 없는 lowercase hexadecimal digest입니다.
  </ResponseField>

  ## 예제

  기본 알고리즘 또는 명시적인 지원 이름으로 Lua string 바이트를 해시합니다.

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

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