1
0
mirror of https://github.com/bitwarden/browser.git synced 2024-09-18 02:41:15 +02:00

hmac directly into array

This commit is contained in:
Kyle Spearrin 2018-06-13 22:47:40 -04:00
parent 4bce071498
commit 6e89b503f2

View File

@ -609,8 +609,7 @@ export class CryptoService implements CryptoServiceAbstraction {
t.set(previousT);
t.set(info, previousT.length);
t.set([i + 1], t.length - 1);
const hmac = await this.cryptoFunctionService.hmac(t.buffer, prk, 'sha256');
previousT = new Uint8Array(hmac);
previousT = new Uint8Array(await this.cryptoFunctionService.hmac(t.buffer, prk, 'sha256'));
okm.set(previousT, i * hashLen);
}
return okm;