@haydenhigg/vigenere
v1.0.1
Published
A small library for Vigenere encryptions.
Downloads
7
Maintainers
Readme
@haydenhigg/vigenere
A small library for Vigenere encryption. Ideal behavior taken from here (unkeyed) and from here (keyed).
Usage
const vigenere = require("./index.js");
var encrypted = vigenere.encrypt("passphrase", "a message that is way too long for the passphrase with otp");
var decrypted = vigenere.decrypt("passphrase", encrypted);
console.log(encrypted); //=> "P MWKHHXE LLPT AK LHP TGS AOFY UVI TZI EAKKEOIAKI LILZ DAG"
console.log(decrypted); //=> "A MESSAGE THAT IS WAY TOO LONG FOR THE PASSPHRASE WITH OTP"
var encryptedWithKey = vigenere.encrypt("passphrase", "a message that is way too long for the passphrase with otp", "the key");
var decryptedWithKey = vigenere.decrypt("passphrase", encryptedWithKey, "the key");
console.log(encryptedWithKey); //=> "V RVMIBKC SKVA AM MBW AGQ YUFY TPJ AUY DGMMDEJGMY MOSU CHG"
console.log(decryptedWithKey); //=> "A MESSAGE THAT IS WAY TOO LONG FOR THE PASSPHRASE WITH OTP"