secret-box
v0.1.1
Published
Encrypt and decrypt secrets.
Downloads
1,229
Maintainers
Readme
secret-box
Encrypt and decrypt secrets. Built on AES-256-GCM and Scrypt for now, may change later.
Sponsored by Exodus Bitcoin and Ethereum wallet.
Install
npm install --save secret-box
Usage
var secretBox = require('secret-box')
const passphrase = new Buffer('open sesame 2')
const message = new Buffer('The secret launch code is 1234.')
const secret = secretBox.encrypt(message, passphrase)
const message2 = secretBox.decrypt(secret, passphrase)
console.log(message2.toString('utf8'))
// => The secret launch code is 1234.