Yuari
Documentation
Docs/Crypt/crypt.hash

crypt.hash

Hashes data. Default algorithm: sha384.

Syntax

crypt.hash(data: string, algorithm?: string) -> string

Parameters

ParameterTypeDescription
datastringThe data payload to process or send.
algorithm?stringThe hashing algorithm name.

Returns

TypeDescription
stringThe returned string.

Description

crypt.hash is part of the Crypt library. Crypt functions process data locally. Keys, hashes and encrypted buffers remain inside the process.

The call is a predicate: it inspects the current state and returns a boolean without modifying anything.

Example

print(crypt.hash("hello", "sha256"))

Notes

  • Never log keys or decrypted buffers in production scripts.