cipher
Provides various cipher functions, such as a Caesar cipher, and Viginere cipher.
letterTable | Just 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
- letter string Letter to modify.
- modifier number How many letters to shift it by.
Returns
- string Shifted letter.
- caesar(input [, shift=-3])Source
Run a Caesar Cipher on the provided string. (https://en.wikipedia.org/wiki/Caesar_cipher)
Parameters
- input string String to cipher.
- shift? number =
-3
Amount of letters to shift the string by.
Returns
- 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
Returns
- 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
Returns
- string The deciphered string.
- rot13(input, The)Source
Run a ROT13 cipher on the input. (https://en.wikipedia.org/wiki/ROT13)
Parameters