https://github.com/zachflower/rotten-encryption
Node package to encode/decode text using a Caesar Shift (or ROT-n) cipher.
https://github.com/zachflower/rotten-encryption
Last synced: 10 months ago
JSON representation
Node package to encode/decode text using a Caesar Shift (or ROT-n) cipher.
- Host: GitHub
- URL: https://github.com/zachflower/rotten-encryption
- Owner: zachflower
- Created: 2015-09-05T21:09:00.000Z (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2015-09-05T21:18:08.000Z (almost 11 years ago)
- Last Synced: 2025-08-13T01:56:55.654Z (10 months ago)
- Language: JavaScript
- Size: 133 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Rotten Encryption
Node package to encode/decode text using a Caesar Shift (or ROT-n) cipher.
## Background
I recently discovered a renewed interest in basic encryption. In an effort
to continue my node.js education, I decided to write a simple package to
encrypt/decrypt strings using a ROT-n cipher (also commonly known as a [Caesar
Shift](https://en.wikipedia.org/wiki/Caesar_cipher)).

**Note: This is an incredibly rudimentary cipher. Please do not use this package
for any serious encryption needs.**
## Installation
```
npm install rotten-encryption
```
## Usage
```
var rotten = require('rotten-encryption');
// number of steps to shift the resulting alphabet
var shift = 6;
// encrypt an input string
rotten.encrypt(shift, 'string to encrypt');
// decrypt an input string
rotten.decrypt(shift, 'string to decrypt');
```