Very basic encrypt and decrypt node module
JavaScript
Switch branches/tags
Nothing to show
Permalink
Failed to load latest commit information.
tests cleaned up tests and readme Mar 24, 2016
.gitignore updated some more structure Apr 30, 2014
LICENCE updated some more structure Apr 30, 2014
README.md cleaned up tests and readme Mar 24, 2016
index.js cleaned up tests and readme Mar 24, 2016
package.json 2.0.0 Mar 24, 2016

README.md

#cryptr

cryptr is a simple encrypt and decrypt module for node.js

It is for doing simple encryption of values UTF-8 strings that need to be decrypted at a later time.

If you require anything more than that you probably want to use something more advanced or crypto directly.

The Cryptr constructor takes 1 required and 1 optional argument.

Cryptr(secret[, algorithm])

If an algorithm is not provided it defaults to aes-256-ctr.

DO NOT USE THIS MODULE FOR ENCRYPTING PASSWORDS!

Passwords should be a one way hash. Use bcrypt for that.

Install

npm install cryptr

Usage

var Cryptr = require('cryptr'),
    cryptr = new Cryptr('myTotalySecretKey');


var encryptedString = cryptr.encrypt('bacon'),
    decryptedString = cryptr.decrypt(encryptedString);

console.log(encryptedString);  // d7233809c0
console.log(decryptedString);  // bacon