https://github.com/rocktimsaikia/rot13-cipher
ROT13 substitution cipher for Node.js
https://github.com/rocktimsaikia/rot13-cipher
node-module npm-package rot13 rot13-cipher rot13-decoder
Last synced: about 1 month ago
JSON representation
ROT13 substitution cipher for Node.js
- Host: GitHub
- URL: https://github.com/rocktimsaikia/rot13-cipher
- Owner: rocktimsaikia
- License: mit
- Created: 2020-10-16T17:00:43.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2020-10-17T09:28:00.000Z (over 4 years ago)
- Last Synced: 2025-05-11T03:59:34.239Z (about 1 month ago)
- Topics: node-module, npm-package, rot13, rot13-cipher, rot13-decoder
- Language: JavaScript
- Homepage:
- Size: 10.7 KB
- Stars: 3
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- License: license
Awesome Lists containing this project
README
# rot13-cipher 
> [`ROT13`](https://en.wikipedia.org/wiki/ROT13) substitution cipher for Node.js. Example: `foobar` → `sbbone`
ROT13 is its own [inverse](https://en.wikipedia.org/wiki/Inverse_function). Meaning, to undo `ROT13`, the same algorithm is applied, so the same action can be used for encoding and decoding.
## Install
```bash
$ npm install rot13-cipher
```## Usage
```js
const rot13Cipher = require("rot13-cipher");rot13Cipher("hello world");
//=> 'uryyb jbeyq'rot13Cipher("foo123bar");
//=> 'sbb123one'rot13Cipher("foo!@bar");
//=> 'sbb!@one'rot13Cipher("uryyb jbeyq");
//=> 'hello world'
```## API
### rot13Cipher(string)
Takes one string input and returns the encoded version of it.
## FAQ
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.
## Licese
MIT © [Rocktim Saikia](https://rocktim.xyz)