syn. crypt. hash Synchronous
syn.crypto.hash
Compute a fixed SHA-384 digest for a byte string. It is a quick way to compare content fingerprints when a script uses the Synapse crypto namespace.
Luau
syn.crypt.hash(data: string) -> stringParameters
| Parameter | Type | Description |
|---|---|---|
data | string | Bytes to hash. |
Returns
stringThe SHA-384 digest as lowercase hexadecimal text.
Usage notes
Use syn.crypt.custom.hash when the other side requires a different supported algorithm. A digest does not keep the input secret.
Availability
This function requires the Synapse environment setting, which is off by default.
Example
Luau
local fingerprint = syn.crypt.hash("profile-v2")
print(fingerprint)
assert(fingerprint == syn.crypt.hash("profile-v2"))