caesar-salad

v2.1.0
Caesar, Vigenere and ROT Ciphers.
Caesar Cipher Vigenere ROT ROT13 ROT18 ROT47 ROT5

caesar-salad Build Status Coverage Status XO code style

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

License

MIT © Michael Mayer

npm i caesar-salad

Metadata

  • MIT
  • >=8.0
  • Michael Mayer
  • released 9/23/2019

Downloads

Maintainers