ROT5 Class
The ROT5 Cipher is a monoalphabetic substitution cipher rotating 0..9
characters.
Examples using static factory methods:
ROT5.Cipher().crypt('0123456789'); // returns: '5678901234'
ROT5.Decipher().crypt('5678901234'); // returns: '0123456789'
Examples using constructors:
new ROT5().crypt('0123456789'); // returns: '5678901234'
new ROT5().crypt('5678901234'); // returns: '0123456789'
See Wikipedia for details.
Constructor
ROT5
()
Item Index
Methods
- _substituteCharCode
- Cipher static
- crypt
- Decipher static
Methods
_substituteCharCode
(
Number
protected
-
charCode
Substitutes only charCodes of 0..9
characters.
Parameters:
-
charCode
Numberthe charCode to substitute.
Returns:
Number:
The substituted charCode.