This package has been deprecated

Author message:

Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

caeser

1.1.6 • Public • Published

Imgur

Install

$ npm install --save caeser

Usage

var caeser = require('caeser');
 
console.log(caeser.encrypt('hello!', 3));
//=> khoor!
 
console.log(caeser.decrypt('khoor!', 3));
//=> hello!

API

caeser.encrypt(plainText, key)

plainText

Type: string

The plain text to be encrypted.

key

Type: number

The key that will be used to encrypt the plain text. It encrypts it by shifting each character right from it's current position in the alphabet by whatever the value of key is. If i used 3 as the key, a would become d, d would become g, etc.

caeser.decrypt(cipherText, key)

cipherText

Type: string

The cipher text to be decrypted.

key

Type: number

The key that will be used to decrypt the cipher text. It decrypts it by shifting each character left from it's current position in the alphabet by whatever the value of key is. If i used 3 as the key, d would become a, g would become d, etc.

License

MIT ©Maximilian Lloyd

Package Sidebar

Install

npm i caeser

Weekly Downloads

0

Version

1.1.6

License

MIT

Last publish

Collaborators

  • branch