diff options
author | Calvin Metcalf <cmetcalf@appgeo.com> | 2015-01-26 15:39:52 -0500 |
---|---|---|
committer | Vladimir Kurchatkin <vladimir.kurchatkin@gmail.com> | 2015-01-28 17:20:54 +0300 |
commit | 90ddb46d522c37d2bc2eb68a6e0c9d52f9fbba42 (patch) | |
tree | 4bf23df1603d266370621934dccff9fac039e6c9 /lib/crypto.js | |
parent | 45d8d9f8262983d7d6434f4500b4e88b63052cd5 (diff) | |
download | node-new-90ddb46d522c37d2bc2eb68a6e0c9d52f9fbba42.tar.gz |
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>
Diffstat (limited to 'lib/crypto.js')
-rw-r--r-- | lib/crypto.js | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/crypto.js b/lib/crypto.js index 2d08433563..f8efffda48 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(); }; |