This is a module that allows you to encode, decode and crack strings using the caesar cipher pattern.
The 2 main functions are:
encode(string, int shift)- encodes a string by shifting the alphabet by shiftdecode(string, int shift)- decodes a string by reversing the encoder with shift. If no shift given it will default to 2.
There is an extra function called:
crack(string)- gives an output of all 25 possible shift variations, the right one is surely within these (use if you don't know the shift with decode)
- Simply download the
caesar_module.jsand put it into your/custom_modules/folder, after that simply putlet caesar = require('./custom_modules/caesar_module.js');at the top of your file.