1.0.0 • Published 6 years ago

crypt-key-file v1.0.0

Weekly downloads
4
License
MIT
Repository
github
Last release
6 years ago

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)
})()
*/