sha256: minor.
This commit is contained in:
parent
c225f67bfc
commit
91af611866
@ -251,23 +251,22 @@ SHA256Hmac.prototype.init = function init(data) {
|
||||
this.inner.init();
|
||||
this.inner.update(data);
|
||||
this.inner._finish(key);
|
||||
key.fill(0, 32);
|
||||
key.fill(0, 32, 64);
|
||||
} else {
|
||||
data.copy(key, 0);
|
||||
key.fill(0, data.length, 64);
|
||||
}
|
||||
|
||||
this.inner.init();
|
||||
this.outer.init();
|
||||
|
||||
for (i = 0; i < key.length; i++)
|
||||
key[i] ^= 0x36;
|
||||
|
||||
this.inner.init();
|
||||
this.inner.update(key);
|
||||
|
||||
for (i = 0; i < key.length; i++)
|
||||
key[i] ^= 0x6a;
|
||||
|
||||
this.outer.init();
|
||||
this.outer.update(key);
|
||||
};
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user