diff --git a/libs/common/src/key-management/master-password/services/master-password.service.spec.ts b/libs/common/src/key-management/master-password/services/master-password.service.spec.ts index 111f210494f..aa96f06c504 100644 --- a/libs/common/src/key-management/master-password/services/master-password.service.spec.ts +++ b/libs/common/src/key-management/master-password/services/master-password.service.spec.ts @@ -2,6 +2,11 @@ import { mock, MockProxy } from "jest-mock-extended"; import { of } from "rxjs"; import * as rxjs from "rxjs"; +import { SdkLoadService } from "@bitwarden/common/platform/abstractions/sdk/sdk-load.service"; +import { Utils } from "@bitwarden/common/platform/misc/utils"; +// eslint-disable-next-line no-restricted-imports +import { KdfConfig, PBKDF2KdfConfig } from "@bitwarden/key-management"; + import { makeEncString, makeSymmetricCryptoKey } from "../../../../spec"; import { ForceSetPasswordReason } from "../../../auth/models/domain/force-set-password-reason"; import { KeyGenerationService } from "../../../platform/abstractions/key-generation.service"; @@ -12,17 +17,11 @@ import { SymmetricCryptoKey } from "../../../platform/models/domain/symmetric-cr import { StateProvider } from "../../../platform/state"; import { UserId } from "../../../types/guid"; import { MasterKey, UserKey } from "../../../types/key"; +import { CryptoFunctionService } from "../../crypto/abstractions/crypto-function.service"; import { EncryptService } from "../../crypto/abstractions/encrypt.service"; +import { MasterPasswordSalt } from "../types/master-password.types"; import { MasterPasswordService } from "./master-password.service"; -import { KdfConfig, KdfType, KeyService, PBKDF2KdfConfig } from "@bitwarden/key-management"; -import { CryptoFunctionService } from "../../crypto/abstractions/crypto-function.service"; -import { - MasterPasswordAuthenticationHash, - MasterPasswordSalt, -} from "../types/master-password.types"; -import { Utils } from "@bitwarden/common/platform/misc/utils"; -import { SdkLoadService } from "@bitwarden/common/platform/abstractions/sdk/sdk-load.service"; describe("MasterPasswordService", () => { let sut: MasterPasswordService; diff --git a/libs/common/src/key-management/master-password/services/master-password.service.ts b/libs/common/src/key-management/master-password/services/master-password.service.ts index 5440c2ddedb..c20d3494877 100644 --- a/libs/common/src/key-management/master-password/services/master-password.service.ts +++ b/libs/common/src/key-management/master-password/services/master-password.service.ts @@ -2,11 +2,17 @@ // @ts-strict-ignore import { firstValueFrom, map, Observable } from "rxjs"; +import { SdkLoadService } from "@bitwarden/common/platform/abstractions/sdk/sdk-load.service"; +import { Utils } from "@bitwarden/common/platform/misc/utils"; +// eslint-disable-next-line no-restricted-imports +import { KdfConfig } from "@bitwarden/key-management"; +import { PureCrypto } from "@bitwarden/sdk-internal"; + import { ForceSetPasswordReason } from "../../../auth/models/domain/force-set-password-reason"; import { KeyGenerationService } from "../../../platform/abstractions/key-generation.service"; import { LogService } from "../../../platform/abstractions/log.service"; import { StateService } from "../../../platform/abstractions/state.service"; -import { EncryptionType, HashPurpose } from "../../../platform/enums"; +import { EncryptionType } from "../../../platform/enums"; import { EncryptedString, EncString } from "../../../platform/models/domain/enc-string"; import { SymmetricCryptoKey } from "../../../platform/models/domain/symmetric-crypto-key"; import { @@ -17,9 +23,9 @@ import { } from "../../../platform/state"; import { UserId } from "../../../types/guid"; import { MasterKey, UserKey } from "../../../types/key"; +import { CryptoFunctionService } from "../../crypto/abstractions/crypto-function.service"; import { EncryptService } from "../../crypto/abstractions/encrypt.service"; import { InternalMasterPasswordServiceAbstraction } from "../abstractions/master-password.service.abstraction"; -import { KdfConfig, KeyService } from "@bitwarden/key-management"; import { MasterKeyWrappedUserKey, MasterPasswordAuthenticationData, @@ -27,10 +33,6 @@ import { MasterPasswordSalt, MasterPasswordUnlockData, } from "../types/master-password.types"; -import { PureCrypto } from "@bitwarden/sdk-internal"; -import { SdkLoadService } from "@bitwarden/common/platform/abstractions/sdk/sdk-load.service"; -import { CryptoFunctionService } from "../../crypto/abstractions/crypto-function.service"; -import { Utils } from "@bitwarden/common/platform/misc/utils"; /** Memory since master key shouldn't be available on lock */ const MASTER_KEY = new UserKeyDefinition(MASTER_PASSWORD_MEMORY, "masterKey", {