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
| var commander = require('commander'); | |
| var fs = require('fs'); | |
| var path = require('path'); | |
| var child = require('child_process'); | |
| commander | |
| .version('0.0.1') | |
| .option('-p, --projeto <nome>', 'Cria um projeto') | |
| .option('-d, --deploy', 'Faz o deploy de um projeto') | |
| .parse(process.argv); |
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
| var rsa = require('rsa-stream'); | |
| var fs = require('fs'); | |
| var privkey = fs.readFileSync('./minhaPrivKey.key', 'utf8'); | |
| var encStream = rsa.dencrypt(privkey); | |
| var inStream = fs.createReadStream('./foto.enc'); | |
| var outStream = fs.createWriteStream('./minhafotolocodedoida.jpg'); | |
| inStream.pipe(encStream).pipe(outStream); |