Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

test: add a test program

Make the test example from the README available to run.
  • Loading branch information...
commit c0c7a5f4129237ff7d4cfc6ca29d0efa802f5db1 1 parent 5b5fa72
@philips authored
Showing with 11 additions and 0 deletions.
  1. +11 −0 test.js
View
11 test.js
@@ -0,0 +1,11 @@
+fs = require('fs')
+
+var DecryptStream = require('./lib/cryptostream.js').DecryptStream;
+var EncryptStream = require('./lib/cryptostream.js').EncryptStream;
+
+var key = 'nodecryptostream';
+
+var e = new EncryptStream(key);
+var d = new DecryptStream(key);
+
+fs.createReadStream(__filename, {encoding: 'binary'}).pipe(e).pipe(d).pipe(process.stdout, {end: false})
Please sign in to comment.
Something went wrong with that request. Please try again.