Skip to content

Commit

Permalink
crypto: remove use of this._readableState
Browse files Browse the repository at this point in the history
Per nodejs#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
omiting it just causes the stream to handle the encoding issues.
  • Loading branch information
calvinmetcalf committed Jan 26, 2015
1 parent 7854811 commit fff49f7
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions lib/crypto.js
Original file line number Diff line number Diff line change
Expand Up @@ -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();
};

Expand Down

0 comments on commit fff49f7

Please sign in to comment.