ROT13
substitution cipher for Node.js. Example:foobar
→sbbone
ROT13 is its own inverse. Meaning, to undo ROT13
, the same algorithm is applied, so the same action can be used for encoding and decoding.
$ npm install rot13-cipher
const rot13Cipher = require("rot13-cipher");
rot13Cipher("hello world");
//=> 'uryyb jbeyq'
rot13Cipher("foo123bar");
//=> 'sbb123one'
rot13Cipher("foo!@bar");
//=> 'sbb!@one'
rot13Cipher("uryyb jbeyq");
//=> 'hello world'
Takes one string input and returns the encoded version of it.
Where is ROT13 Cipher used ?
ROT13 is used in online forums as a means of hiding spoilers, punchlines, puzzle solutions, and offensive materials from the casual glance. ROT13 has inspired a variety of letter and word games online, and is frequently mentioned in newsgroup conversations.
MIT © Rocktim Saikia