1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-16 16:23:44 +00:00

prelogin kdf info

This commit is contained in:
Kyle Spearrin
2018-08-14 15:14:04 -04:00
parent 662c229de1
commit 147b3ff993
6 changed files with 21 additions and 18 deletions

View File

@@ -54,7 +54,9 @@ export class ChangePasswordComponent {
const request = new PasswordRequest();
request.masterPasswordHash = await this.cryptoService.hashPassword(this.currentMasterPassword, null);
const email = await this.userService.getEmail();
const newKey = await this.cryptoService.makeKey(this.newMasterPassword, email);
const kdf = await this.userService.getKdf();
const kdfIterations = await this.userService.getKdfIterations();
const newKey = await this.cryptoService.makeKey(this.newMasterPassword, email, kdf, kdfIterations);
request.newMasterPasswordHash = await this.cryptoService.hashPassword(this.newMasterPassword, newKey);
const encKey = await this.cryptoService.getEncKey();
const newEncKey = await this.cryptoService.encrypt(encKey.key, newKey);