Skip to content

Commit 1334d89

Browse files
committed
hash: adhere to standard
1 parent d1a23ab commit 1334d89

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

hash.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
1-
//prototype class for hash functions
1+
// prototype class for hash functions
22
function Hash (blockSize, finalSize) {
3-
this._block = new Buffer(blockSize) //new Uint32Array(blockSize/4)
3+
this._block = new Buffer(blockSize)
44
this._finalSize = finalSize
55
this._blockSize = blockSize
66
this._len = 0
77
this._s = 0
88
}
99

1010
Hash.prototype.update = function (data, enc) {
11-
if ("string" === typeof data) {
12-
enc = enc || "utf8"
11+
if (typeof data === 'string') {
12+
enc = enc || 'utf8'
1313
data = new Buffer(data, enc)
1414
}
1515

0 commit comments

Comments
 (0)