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.

Syntax
Luau
syn.crypt.hash(data: string) -> string

Parameters

Function parameters
ParameterTypeDescription
datastringBytes to hash.

Returns

string

The 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

Example
Luau
local fingerprint = syn.crypt.hash("profile-v2")
print(fingerprint)
assert(fingerprint == syn.crypt.hash("profile-v2"))
Kawaii documentation