Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

caesar-salad

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

caesar-salad

Caesar, Vigenere and ROT Ciphers.

  • 2.1.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

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('abc-0123456789@example.com');
//=> cde-0123456789@gzcorng.eqo

Caesar.Decipher('c').crypt('cde-0123456789@gzcorng.eqo');
//=> abc-0123456789@example.com

Vigenere Cipher

See here for supported password formats.

const Vigenere = require('caesar-salad').Vigenere;

Vigenere.Cipher('password').crypt('abc-0123456789@example.com');
//=> pbu-0123456789@wtodsae.ugi

Vigenere.Decipher('password').crypt('pbu-0123456789@wtodsae.ugi');
//=> abc-0123456789@example.com

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('abc-0123456789@example.com');    //=> nop-0123456789@rknzcyr.pbz
 ROT5.Cipher().crypt('abc-0123456789@example.com');    //=> abc-5678901234@example.com
ROT18.Cipher().crypt('abc-0123456789@example.com');    //=> nop-5678901234@rknzcyr.pbz
ROT47.Cipher().crypt('abc-0123456789@example.com');    //=> 234\\_`abcdefgho6I2>A=6]4@>


ROT13.Decipher().crypt('nop-0123456789@rknzcyr.pbz');  //=> abc-0123456789@example.com
 ROT5.Decipher().crypt('abc-5678901234@example.com');  //=> abc-0123456789@example.com
ROT18.Decipher().crypt('nop-5678901234@rknzcyr.pbz');  //=> abc-0123456789@example.com
ROT47.Decipher().crypt('234\\_`abcdefgho6I2>A=6]4@>'); //=> abc-0123456789@example.com

Documentation

  • See API for thorough documentation

License

MIT © Michael Mayer

Keywords

FAQs

Package last updated on 23 Sep 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc