mirror of https://github.com/nodejs/node.git
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: https://github.com/iojs/io.js/pull/610 Reviewed-By: Chris Dickinson <christopher.s.dickinson@gmail.com> Reviewed-By: Fedor Indutny <fedor.indutny@gmail.com> Reviewed-By: Vladimir Kurchatkin <vladimir.kurchatkin@gmail.com>pull/621/merge
parent
45d8d9f826
commit
90ddb46d52
|
@ -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();
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue