Skip to content

TypeScript API / laikacms/crypto / sha256

Function: sha256() ​

ts
function sha256(plain): Promise<string>;

Hash data using SHA-256 for PKCE compatibility. Note: SHA-256 provides 128-bit security against quantum attacks.

Parameters ​

ParameterTypeDescription
plainstringPlain text to hash

Returns ​

Promise<string>

Base64url-encoded hash

Released under the MIT License.