Skip to content

Commit 388d45e

Browse files
committed
hash: rm unnecessary _s state
1 parent 158bc83 commit 388d45e

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

hash.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ function Hash (blockSize, finalSize) {
66
this._finalSize = finalSize
77
this._blockSize = blockSize
88
this._len = 0
9-
this._s = 0
109
}
1110

1211
Hash.prototype.update = function (data, enc) {
@@ -15,8 +14,8 @@ Hash.prototype.update = function (data, enc) {
1514
data = new Buffer(data, enc)
1615
}
1716

17+
var s = this._len
1818
var l = this._len += data.length
19-
var s = this._s || 0
2019
var f = 0
2120
var buffer = this._block
2221

@@ -35,7 +34,6 @@ Hash.prototype.update = function (data, enc) {
3534
this._update(buffer)
3635
}
3736
}
38-
this._s = s
3937

4038
return this
4139
}

0 commit comments

Comments
 (0)