1.0.4 • Published 3 years ago
@theobaidur/simple-encrypt-decrypt v1.0.4
Simple Encrypt Decrypt
The simplest library to encrypt & decrypt text. This is suitable for small & simple applications.
You should never use this library for serious projects.
Usage
import config, { decrypt, encrypt } from "@theobaidur/simple-encrypt-decrypt";
// configuration
config.salt = "simple_encrypt_decrypt";
// encrypt some text
const encrypted = encrypt("Hello world");
console.log(encrypted); // output:: 4c6168686b24736b766860
// decrypt the encrypted text
const text = decrypt(encrypted);
console.log(text); // output:: Hello world
Credits
Inspired from