getfunctionhash
Computes a function's bytecode fingerprint.
Syntax
Signature
getfunctionhash(Function: function) -> stringAliases
This function has no aliases.
Parameters
| Parameter | Type | Description |
|---|---|---|
Function | function | Luau closure to fingerprint. |
Returns
| Type | Description |
|---|---|
string | 64-character hexadecimal SHA-256 digest. |
Notes
Returns a lowercase SHA-256 digest of the hexadecimal bytecode dump produced by debug.decompile. Function must be a Luau closure. This is a bytecode fingerprint and does not identify source text.
Example
Luau
local Result = getfunctionhash(function() return 42 end)
print(Result)