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

update register component again with more crypto service

This commit is contained in:
Jacob Fink
2023-05-30 12:02:33 -04:00
parent 23e6d1117a
commit 51d744132b

View File

@@ -271,8 +271,8 @@ export class RegisterComponent extends CaptchaProtectedComponent implements OnIn
const hint = this.formGroup.value.hint; const hint = this.formGroup.value.hint;
const kdf = DEFAULT_KDF_TYPE; const kdf = DEFAULT_KDF_TYPE;
const kdfConfig = DEFAULT_KDF_CONFIG; const kdfConfig = DEFAULT_KDF_CONFIG;
const key = await this.cryptoService.makeKey(masterPassword, email, kdf, kdfConfig); const key = await this.cryptoService.makeMasterKey(masterPassword, email, kdf, kdfConfig);
const encKey = await this.cryptoService.makeEncKey(key); const newUserSymKey = await this.cryptoService.makeUserSymKey(key);
const hashedPassword = await this.cryptoService.hashPassword(masterPassword, key); const hashedPassword = await this.cryptoService.hashPassword(masterPassword, key);
const keys = await this.cryptoService.makeKeyPair(newUserSymKey[0]); const keys = await this.cryptoService.makeKeyPair(newUserSymKey[0]);
const request = new RegisterRequest( const request = new RegisterRequest(
@@ -280,7 +280,7 @@ export class RegisterComponent extends CaptchaProtectedComponent implements OnIn
name, name,
hashedPassword, hashedPassword,
hint, hint,
encKey[1].encryptedString, newUserSymKey[1].encryptedString,
this.referenceData, this.referenceData,
this.captchaToken, this.captchaToken,
kdf, kdf,