mirror of
https://github.com/bitwarden/browser
synced 2025-12-16 00:03:56 +00:00
[PM-8772] move ranges to static properties on class (#9567)
* move ranges to static properties on class * rename static properties
This commit is contained in:
@@ -5,17 +5,11 @@ import { Subject, takeUntil } from "rxjs";
|
||||
import { KdfConfigService } from "@bitwarden/common/auth/abstractions/kdf-config.service";
|
||||
import {
|
||||
Argon2KdfConfig,
|
||||
DEFAULT_KDF_CONFIG,
|
||||
KdfConfig,
|
||||
PBKDF2KdfConfig,
|
||||
} from "@bitwarden/common/auth/models/domain/kdf-config";
|
||||
import {
|
||||
DEFAULT_KDF_CONFIG,
|
||||
PBKDF2_ITERATIONS,
|
||||
ARGON2_ITERATIONS,
|
||||
ARGON2_MEMORY,
|
||||
ARGON2_PARALLELISM,
|
||||
KdfType,
|
||||
} from "@bitwarden/common/platform/enums";
|
||||
import { KdfType } from "@bitwarden/common/platform/enums";
|
||||
import { DialogService } from "@bitwarden/components";
|
||||
|
||||
import { ChangeKdfConfirmationComponent } from "./change-kdf-confirmation.component";
|
||||
@@ -56,10 +50,10 @@ export class ChangeKdfComponent implements OnInit {
|
||||
});
|
||||
|
||||
// Default values for template
|
||||
protected PBKDF2_ITERATIONS = PBKDF2_ITERATIONS;
|
||||
protected ARGON2_ITERATIONS = ARGON2_ITERATIONS;
|
||||
protected ARGON2_MEMORY = ARGON2_MEMORY;
|
||||
protected ARGON2_PARALLELISM = ARGON2_PARALLELISM;
|
||||
protected PBKDF2_ITERATIONS = PBKDF2KdfConfig.ITERATIONS;
|
||||
protected ARGON2_ITERATIONS = Argon2KdfConfig.ITERATIONS;
|
||||
protected ARGON2_MEMORY = Argon2KdfConfig.MEMORY;
|
||||
protected ARGON2_PARALLELISM = Argon2KdfConfig.PARALLELISM;
|
||||
|
||||
constructor(
|
||||
private dialogService: DialogService,
|
||||
|
||||
@@ -5,9 +5,10 @@ import { mergeMap, take } from "rxjs/operators";
|
||||
import { KdfConfigService } from "@bitwarden/common/auth/abstractions/kdf-config.service";
|
||||
import { TokenService } from "@bitwarden/common/auth/abstractions/token.service";
|
||||
import { UserVerificationService } from "@bitwarden/common/auth/abstractions/user-verification/user-verification.service.abstraction";
|
||||
import { PBKDF2KdfConfig } from "@bitwarden/common/auth/models/domain/kdf-config";
|
||||
import { BillingAccountProfileStateService } from "@bitwarden/common/billing/abstractions/account/billing-account-profile-state.service";
|
||||
import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service";
|
||||
import { KdfType, PBKDF2_ITERATIONS } from "@bitwarden/common/platform/enums";
|
||||
import { KdfType } from "@bitwarden/common/platform/enums";
|
||||
import {
|
||||
StateProvider,
|
||||
ActiveUserState,
|
||||
@@ -200,7 +201,7 @@ export class VaultBannersService {
|
||||
const kdfConfig = await this.kdfConfigService.getKdfConfig();
|
||||
return (
|
||||
kdfConfig.kdfType === KdfType.PBKDF2_SHA256 &&
|
||||
kdfConfig.iterations < PBKDF2_ITERATIONS.defaultValue
|
||||
kdfConfig.iterations < PBKDF2KdfConfig.ITERATIONS.defaultValue
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user