scrambler

0.0.3 • Public • Published

Scrambler

Simplified 2-way encryption for Node.js / IO.js.

Usage

var scrambler = require('scrambler'),
    password  = 'password';

var enc = scrambler.encrypt('hello world', password);
console.log(enc) // => '8e81390fc89894eef0e32b2862e94065'

var orig = scrambler.decrypt(enc, password);
console.log(orig) // => 'hello world' 

API

scrambler.encrypt(string, password)

Encrypts a string with the given encryption password.

scrambler.encrypt('the galaxy is on orions belt', 'testing');

scrambler.decrypt(string, password)

Decrypts a string with the given encryption password.

var str = '3fae03cecfaf82581adf87bbe0d799a2e0f98585e3ef39bd04fee0948e37f8a4';
var res = scrambler.encrypt(str, 'test');

console.log(res) // => [message too secret to tell openly]

Small print

Written by Tomás Pollak. (c) Fork, Ltd. MIT License.

Readme

Keywords

none

Package Sidebar

Install

npm i scrambler

Weekly Downloads

0

Version

0.0.3

License

ISC

Last publish

Collaborators

  • tomas