Created
May 18, 2016 19:00
-
-
Save saml/1e19da13d3a554d5fa8dc3c84dc562e7 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
const fs = require('fs'); | |
const crypto = require('crypto'); | |
const input = fs.createReadStream(__filename); | |
const encrypt = crypto.createCipher("aes-256-ctr", "iamapassword"); | |
const decrypt = crypto.createDecipher("aes-256-ctr", "iamapassword"); | |
input.pipe(encrypt).pipe(decrypt).pipe(process.stdout); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment