0.0.3 • Published 9 years ago

simple-aes-json v0.0.3

Weekly downloads
11
License
MIT
Repository
github
Last release
9 years ago

NPM version Build Status Dependency Status

simple-aes-json

Minimalistic nodejs AES-256 implementation.

Installation

npm install simple-aes-json --save

Usage

var saj = require('simple-aes-json');

// Encryption

saj.encrypt('123456789','passphrase',function(encrypted){

  console.log(encrypted)
  //{"ct":"z/apIxwSDRmqDlvhmTfhJA==","iv":"f960b8b5722b64b1ea4b09d7c548ffb8","s":"d20cc8ac7b5f31cb"}

});

// Decryption

saj.decrypt(encryptedJSON,'passphrase',function(result){
  console.log(result); //'123456789'
});

Credits

Manyroots

License

MIT © ManyRoots