Skip to content

Commit 90ddb46

Browse files
calvinmetcalfvkurchatkin
authored andcommitted
crypto: remove use of this._readableState
Per #445 this removes a reference to this._readableState in hash._flush. It was used to get the encoding on the readable side to pass to the writable side but omitting it just causes the stream to handle the encoding issues. PR-URL: #610 Reviewed-By: Chris Dickinson <[email protected]> Reviewed-By: Fedor Indutny <[email protected]> Reviewed-By: Vladimir Kurchatkin <[email protected]>
1 parent 45d8d9f commit 90ddb46

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

lib/crypto.js

+1-2
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,7 @@ Hash.prototype._transform = function(chunk, encoding, callback) {
8686
};
8787

8888
Hash.prototype._flush = function(callback) {
89-
var encoding = this._readableState.encoding || 'buffer';
90-
this.push(this._handle.digest(encoding), encoding);
89+
this.push(this._handle.digest());
9190
callback();
9291
};
9392

0 commit comments

Comments
 (0)