crypt-key-file
v1.0.0
Published
Extension of [crypto](https://nodejs.org/api/crypto.html#crypto_class_cipher) Symmetric key API that uses files as keys.
Downloads
4
Readme
crypt-key-file
Extension of crypto Symmetric key API that uses files as keys.
Getting Started
var {createCypher, createDecypher} = require('crypto-key-file')
var fs = require('fs')
;(async function () {
var ws = fs.createWriteStream('./crypted')
var rs = fs.createReadStream('./LICENSE')
// algoritm are same of crypto
// file README is key
var cypher = await createCypher('aes192','./README.md')
rs.pipe(cypher).pipe(ws)
})()
;(async function () {
var ws = fs.createWriteStream('./decrypt')
var rs = fs.createReadStream('./crypted')
var cypher = await createDecypher('aes192','./README.md')
rs.pipe(cypher).pipe(ws)
})()
*/