diff --git a/lib/crypto.js b/lib/crypto.js index 2d0843356363a8..f8efffda483ec7 100644 --- a/lib/crypto.js +++ b/lib/crypto.js @@ -86,8 +86,7 @@ Hash.prototype._transform = function(chunk, encoding, callback) { }; Hash.prototype._flush = function(callback) { - var encoding = this._readableState.encoding || 'buffer'; - this.push(this._handle.digest(encoding), encoding); + this.push(this._handle.digest()); callback(); };