From f4a7e7591de9cea9ddaa037e18b9008639324cbe Mon Sep 17 00:00:00 2001 From: Kyle Spearrin Date: Wed, 13 Feb 2019 00:04:34 -0500 Subject: [PATCH] use user kdf settings for making PIN key --- jslib | 2 +- src/popup/settings/settings.component.ts | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/jslib b/jslib index 7a1e7b5474..53260a5be8 160000 --- a/jslib +++ b/jslib @@ -1 +1 @@ -Subproject commit 7a1e7b54743f065ee10eb27499186b629cce22b5 +Subproject commit 53260a5be8456f5d45fe68dfcac59dc28ab4e8c2 diff --git a/src/popup/settings/settings.component.ts b/src/popup/settings/settings.component.ts index 7a390b0d4d..d6823c4b44 100644 --- a/src/popup/settings/settings.component.ts +++ b/src/popup/settings/settings.component.ts @@ -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);