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

# getfunctionhash

> Returns an uppercase SHA384 hex digest derived from a Luau function. The argument must be a function, and C closures raise "Lua function expected". If no hashable function content is available, the function returns nil.

<div className="real-function-page">
  ```lua theme={null}
  getfunctionhash(func: function): string | nil
  ```

  ## 参数

  <ParamField path={"func"} type={"function"} required>
    Luau function to hash. Passing a C closure raises "Lua function expected".
  </ParamField>

  ## 返回值

  <ResponseField name={"hash"} type={"string | nil"}>
    Uppercase SHA384 hex digest string, or nil if no hashable function content is available.
  </ResponseField>

  ## 示例

  Hash the Proto bytes for a Luau function closure.

  ```lua theme={null}
  local function sample(value)
      return value + 1
  end

  local hash = getfunctionhash(sample)
  print(hash)
  ```
</div>
