diff --git a/libs/common/src/key-management/encrypted-migrator/migrations/minimum-kdf-migration.spec.ts b/libs/common/src/key-management/encrypted-migrator/migrations/minimum-kdf-migration.spec.ts index 57e37568ca5..cf2bd307b6c 100644 --- a/libs/common/src/key-management/encrypted-migrator/migrations/minimum-kdf-migration.spec.ts +++ b/libs/common/src/key-management/encrypted-migrator/migrations/minimum-kdf-migration.spec.ts @@ -140,7 +140,7 @@ describe("MinimumKdfMigration", () => { // Verify the PBKDF2KdfConfig has the correct iteration count const kdfConfigArg = (mockChangeKdfService.updateUserKdfParams as jest.Mock).mock.calls[0][1]; - expect(kdfConfigArg.iterations).toBe(PBKDF2KdfConfig.ITERATIONS.min); + expect(kdfConfigArg.iterations).toBe(PBKDF2KdfConfig.ITERATIONS.defaultValue); }); it("should throw error when userId is null", async () => { diff --git a/libs/common/src/key-management/encrypted-migrator/migrations/minimum-kdf-migration.ts b/libs/common/src/key-management/encrypted-migrator/migrations/minimum-kdf-migration.ts index b6dc9b78394..0666064b36e 100644 --- a/libs/common/src/key-management/encrypted-migrator/migrations/minimum-kdf-migration.ts +++ b/libs/common/src/key-management/encrypted-migrator/migrations/minimum-kdf-migration.ts @@ -54,7 +54,7 @@ export class MinimumKdfMigration implements EncryptedMigration { const kdfConfig = await this.kdfConfigService.getKdfConfig(userId); if ( kdfConfig.kdfType !== KdfType.PBKDF2_SHA256 || - kdfConfig.iterations >= PBKDF2KdfConfig.ITERATIONS.defaultValue + kdfConfig.iterations >= PBKDF2KdfConfig.ITERATIONS.min ) { return "noMigrationNeeded"; }