We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d1a23ab commit 1334d89Copy full SHA for 1334d89
hash.js
@@ -1,15 +1,15 @@
1
-//prototype class for hash functions
+// prototype class for hash functions
2
function Hash (blockSize, finalSize) {
3
- this._block = new Buffer(blockSize) //new Uint32Array(blockSize/4)
+ this._block = new Buffer(blockSize)
4
this._finalSize = finalSize
5
this._blockSize = blockSize
6
this._len = 0
7
this._s = 0
8
}
9
10
Hash.prototype.update = function (data, enc) {
11
- if ("string" === typeof data) {
12
- enc = enc || "utf8"
+ if (typeof data === 'string') {
+ enc = enc || 'utf8'
13
data = new Buffer(data, enc)
14
15
0 commit comments