use user kdf settings for making PIN key
This commit is contained in:
parent
d5cbae7803
commit
f4a7e7591d
2
jslib
2
jslib
|
@ -1 +1 @@
|
|||
Subproject commit 7a1e7b54743f065ee10eb27499186b629cce22b5
|
||||
Subproject commit 53260a5be8456f5d45fe68dfcac59dc28ab4e8c2
|
|
@ -122,7 +122,10 @@ export class SettingsComponent implements OnInit {
|
|||
buttons: [this.i18nService.t('cancel'), this.i18nService.t('submit')],
|
||||
});
|
||||
if (pin != null && pin.trim() !== '') {
|
||||
const pinKey = await this.cryptoService.makePinKey(pin, await this.userService.getEmail());
|
||||
const kdf = await this.userService.getKdf();
|
||||
const kdfIterations = await this.userService.getKdfIterations();
|
||||
const email = await this.userService.getEmail();
|
||||
const pinKey = await this.cryptoService.makePinKey(pin, email, kdf, kdfIterations);
|
||||
const key = await this.cryptoService.getKey();
|
||||
const pinProtectedKey = await this.cryptoService.encrypt(key.key, pinKey);
|
||||
await this.storageService.save(ConstantsService.pinProtectedKey, pinProtectedKey.encryptedString);
|
||||
|
|
Loading…
Reference in New Issue