Parameters
function
required
A Luau closure. C closures have no bytecode and are rejected.
Returns
string
A lowercase hex SHA-384 digest of the function’s bytecode.
Behavior
The hash is computed over the function’s proto bytecode, so it depends on the compiled code rather than on the closure object. It is the exact valuefiltergc’s Hash option matches against, so you can
locate a function by hashing a known copy and filtering for it.
The digest is SHA-384. Treat the string as opaque and compare it for equality
rather than assuming a particular length, or that it lines up with another tool’s
hash of the same function.
Example
Errors
Related
filtergc: match functions byHash.islclosure: confirm a function can be hashed.