summaryrefslogtreecommitdiff
path: root/lib/crypto.js
diff options
context:
space:
mode:
Diffstat (limited to 'lib/crypto.js')
-rw-r--r--lib/crypto.js14
1 files changed, 7 insertions, 7 deletions
diff --git a/lib/crypto.js b/lib/crypto.js
index 224c9da5db..500e14d2f8 100644
--- a/lib/crypto.js
+++ b/lib/crypto.js
@@ -160,13 +160,13 @@ function Hash(algorithm, options) {
util.inherits(Hash, stream.Transform);
-Hash.prototype._transform = function(chunk, output, callback) {
+Hash.prototype._transform = function(chunk, callback) {
this._binding.update(chunk);
callback();
};
-Hash.prototype._flush = function(output, callback) {
- output(this._binding.digest());
+Hash.prototype._flush = function(callback) {
+ this.push(this._binding.digest());
callback();
};
@@ -226,13 +226,13 @@ function Cipher(cipher, password, options) {
util.inherits(Cipher, stream.Transform);
-Cipher.prototype._transform = function(chunk, output, callback) {
- output(this._binding.update(chunk));
+Cipher.prototype._transform = function(chunk, callback) {
+ this.push(this._binding.update(chunk));
callback();
};
-Cipher.prototype._flush = function(output, callback) {
- output(this._binding.final());
+Cipher.prototype._flush = function(callback) {
+ this.push(this._binding.final());
callback();
};