Skip to content

Instantly share code, notes, and snippets.

@chunhui2001
chunhui2001 / crypto-stream.js
Created May 3, 2016 13:13 — forked from chris-rock/crypto-stream.js
Encrypt and decrypt streams
// Part of https://github.com/chris-rock/node-crypto-examples
// Nodejs encryption of buffers
var crypto = require('crypto'),
algorithm = 'aes-256-ctr',
password = 'd6F3Efeq';
var fs = require('fs');
var zlib = require('zlib');