Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
rot13 encoding/decoding stream for node.js
JavaScript
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
examples
test
.gitignore
LICENSE
README.md
index.js
package.json

README.md

rot13-stream

This repository is an example of how you can create a readable and writable stream, a through stream, in node. This particular stream transforms input by applying the ROT13 substitution cipher and is based on through by @dominictarr.

Example

example.js

var rot13 = require('rot13-stream')();
process.stdin.pipe(rot13).pipe(process.stdout)
$ echo 'The quick brown fox jumps over the lazy dog' | node example.js
Gur dhvpx oebja sbk whzcf bire gur ynml qbt

This cipher is also an example of an encrypting algorithm which is its own inverse, i.e. applying it twice produces the same output as the input:

$ echo 'Gur dhvpx oebja sbk whzcf bire gur ynml qbt' | node example.js
The quick brown fox jumps over the lazy dog

Install

npm install rot13-stream

License

MIT

Something went wrong with that request. Please try again.