cipher

Provides various cipher functions, such as a Caesar cipher, and Viginere cipher.

letterTableJust a numerically indiced table that contains every letter of the alphabet (English alphabet.
shiftLetter(letter, modifier)Shift a single letter by a modifier.
caesar(input [, shift=-3])Run a Caesar Cipher on the provided string.
viginere(input, key)Run a Viginere cipher on the provided string.
viginereDecode(input, key)Reverse a Viginere cipher on the provided string.
rot13(input, The)Run a ROT13 cipher on the input.
letterTableSource

Just a numerically indiced table that contains every letter of the alphabet (English alphabet.)

shiftLetter(letter, modifier)Source

Shift a single letter by a modifier.

Parameters

  1. letter string Letter to modify.
  2. modifier number How many letters to shift it by.

Returns

  1. string Shifted letter.
caesar(input [, shift=-3])Source

Run a Caesar Cipher on the provided string. (https://en.wikipedia.org/wiki/Caesar_cipher)

Parameters

  1. input string String to cipher.
  2. shift? number = -3 Amount of letters to shift the string by.

Returns

  1. string Ciphered string.
viginere(input, key)Source

Run a Viginere cipher on the provided string. (https://en.wikipedia.org/wiki/Vigen%C3%A8re_cipher)

Parameters

  1. input string String to cipher.
  2. key string Key to cipher the string with.

Returns

  1. string The ciphered string.
viginereDecode(input, key)Source

Reverse a Viginere cipher on the provided string. (https://en.wikipedia.org/wiki/Vigen%C3%A8re_cipher)

Parameters

  1. input string String to decipher.
  2. key string Key to decipher the string with.

Returns

  1. string The deciphered string.
rot13(input, The)Source

Run a ROT13 cipher on the input. (https://en.wikipedia.org/wiki/ROT13)

Parameters

  1. input string The string to cipher.
  2. The string ciphered string.