crypt-key-file

1.0.0 • Public • Published

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

Readme

Keywords

Package Sidebar

Install

npm i crypt-key-file

Weekly Downloads

1

Version

1.0.0

License

MIT

Unpacked Size

4.17 kB

Total Files

6

Last publish

Collaborators

  • antoniomuso