caesar-salad
v2.1.0
Published
Caesar, Vigenere and ROT Ciphers.
Downloads
13,980
Maintainers
Readme
caesar-salad
Caesar, Vigenere and ROT Ciphers
Install
$ npm install --save caesar-salad
Usage
Caesar Cipher
See here for supported password formats.
const Caesar = require('caesar-salad').Caesar;
Caesar.Cipher('c').crypt('[email protected]');
//=> [email protected]
Caesar.Decipher('c').crypt('[email protected]');
//=> [email protected]
Vigenere Cipher
See here for supported password formats.
const Vigenere = require('caesar-salad').Vigenere;
Vigenere.Cipher('password').crypt('[email protected]');
//=> [email protected]
Vigenere.Decipher('password').crypt('[email protected]');
//=> [email protected]
ROT Cipher
const caesarSalad = require('caesar-salad');
const ROT13 = caesarSalad.ROT13;
const ROT5 = caesarSalad.ROT5;
const ROT18 = caesarSalad.ROT18;
const ROT47 = caesarSalad.ROT47;
ROT13.Cipher().crypt('[email protected]'); //=> [email protected]
ROT5.Cipher().crypt('[email protected]'); //=> [email protected]
ROT18.Cipher().crypt('[email protected]'); //=> [email protected]
ROT47.Cipher().crypt('[email protected]'); //=> 234\\_`abcdefgho6I2>A=6]4@>
ROT13.Decipher().crypt('[email protected]'); //=> [email protected]
ROT5.Decipher().crypt('[email protected]'); //=> [email protected]
ROT18.Decipher().crypt('[email protected]'); //=> [email protected]
ROT47.Decipher().crypt('234\\_`abcdefgho6I2>A=6]4@>'); //=> [email protected]
Documentation
- See API for thorough documentation
Related
- caesar-salad-cli CLI for this module
License
MIT © Michael Mayer