crypto-lite-utils
v1.0.0
Published
A lightweight crypto wrapper providing common hashing, encryption, and random token utilities.
Readme
crypto-lite
A lightweight crypto wrapper providing common hashing, encryption, and random token utilities.
Installation
npm install crypto-lite
Usage
import { sha256, randomToken, encrypt, decrypt } from "crypto-lite";
console.log(sha256("hello")); console.log(randomToken());
const key = "12345678901234567890123456789012"; // 32 chars
const enc = encrypt("secret message", key); console.log(enc);
const dec = decrypt(enc, key); console.log(dec);
