passenc
v1.0.0
Published
no dependencies, simple semi-secure password encryption without AES.
Downloads
4
Readme
passenc
Simple AES-less encryption via node.
With the EncryptionKey class:
const {
GenerateSecureKey,
EncryptionKey
} = require("passenc");
const password = GenerateSecureKey(256);
const key = new EncryptionKey(password);
const text = "origin";
const encrypted = key.encrypt(text);
const decrypted = key.decrypt(encrypted);
console.assert(decrypted === text);
With the encrypt & decrypt functions:
const { encrypt, decrypt } = require("passenc");
const key = "normal password works too";
const text = "origin";
const encrypted = encrypt(text, key);
const decrypted = decrypt(encrypted, key);
console.assert(decrypted === text)