tiny-crypto-utils
v1.0.0
Published
Lightweight, browser-compatible crypto utilities.
Readme
tiny-crypto-utils
Lightweight, browser-compatible crypto and encoding utilities.
Installation
npm install tiny-crypto-utilsUsage
import { base64Encode, base64Decode, simpleEncrypt, hashString } from 'tiny-crypto-utils';
const b64 = base64Encode('hello');
base64Decode(b64); // 'hello'
const enc = simpleEncrypt('data', 'key'); // Lightweight XOR obfuscation
const hash = hashString('data'); // djb2 non-cryptographic hashAvailable Functions
base64Encode(str)base64Decode(str)simpleEncrypt(text, key)— XOR obfuscation (not secure!)simpleDecrypt(encoded, key)hashString(str)— Fast 32-bit integer hash
