secret-box

Encrypt and decrypt secrets.

Downloads in past

Stats

StarsIssuesVersionUpdatedCreatedSize
secret-box
0.1.16 years ago6 years agoMinified + gzip package size for secret-box in KB

Readme

secret-box
!npmnpm-imagenpm-url !travistravis-imagetravis-url !standardstandard-imagestandard-url
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.

License

MIT