Skip to main content
zerotal

Documentation


Documentation / @zerotal/core / security

security

Security primitives for Zerotal (the @zerotal/core/security subpath): Crypt for APP_KEY-keyed AES-256-GCM encryption and Hash for argon2id/bcrypt password hashing. Both are zero-config facades — no provider registration required — that read APP_KEY from the environment on first use.

Example

import { Crypt, Hash } from "@zerotal/core/security";

const token = Crypt.encryptString("secret");
Crypt.decryptString(token); // "secret"

const digest = await Hash.make("hunter2");
await Hash.verify("hunter2", digest); // true

Classes

Type Aliases

Variables