1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-28 06:03:40 +00:00

implement crypto functions in more places

This commit is contained in:
Kyle Spearrin
2018-04-21 23:55:21 -04:00
parent fc1114a6bd
commit 5e7115f78d
6 changed files with 26 additions and 43 deletions

View File

@@ -38,7 +38,7 @@ export class WebCryptoFunctionService implements CryptoFunctionService {
};
const impKey = await this.subtle.importKey('raw', passwordBuf, { name: 'PBKDF2' }, false, ['deriveBits']);
return await window.crypto.subtle.deriveBits(pbkdf2Params, impKey, wcLen);
return await this.subtle.deriveBits(pbkdf2Params, impKey, wcLen);
}
async hash(value: string | ArrayBuffer, algorithm: 'sha1' | 'sha256' | 'sha512'): Promise<ArrayBuffer> {