1.0.0 • Published 5 years ago

@haydenhigg/gronsfeld v1.0.0

Weekly downloads
-
License
MIT
Repository
-
Last release
5 years ago

@haydenhigg/gronsfeld

A small library for gronsfeld encryption. Ideal behavior taken from here

Usage

const gronsfeld = require("@haydenhigg/gronsfeld");

var passcode = 15763; // could be a string of digits as well

var encrypted = gronsfeld.encrypt(passcode, "the message"); // UML SHTXHMH
HBF SAUZJOA
THE MESSAGE
var decrypted = gronsfeld.decrypt(passcode, encrypted); // THE MESSAGE

console.log(encrypted);
console.log(decrypted);

var encryptedWithKey = gronsfeld.encrypt(passcode, "the message", "the key"); // HBF SAUZJOA
var decryptedWithKey = gronsfeld.decrypt(passcode, encryptedWithKey, "the key"); // THE MESSAGE

console.log(encryptedWithKey); // 
console.log(decryptedWithKey);