Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- exports.createSecureStream = function(clearStream, encryptedStream, credentials, is_server){
- var stream = new exports.SecureStream(credentials, is_server);
- // r/w cleartext data
- clearStream.pipe(stream._clear);
- stream._clear.pipe(clearStream);
- // r/w encrypted data
- stream._encrypted.pipe(encryptedStream);
- encryptedStream.pipe(stream._encrypted);
- return stream;
- }
- exports.SecureStream = function(){
- Stream.call(this);
- }
- ...
Add Comment
Please, Sign In to add comment