mirror of
https://github.com/bitwarden/browser
synced 2026-01-03 17:13:47 +00:00
[PS-2264] Make password protected exports support account's iterations and argon2 (#4479)
* Fix encrypted export using fixed PBKDF2 iterations * Replace hardcoded KdfType in importer * Clean up kdf handling in password-protected export * Extract BitwardenPasswordProtectedFileFormat * Rename bitwarden-json-types * Move StateService import to fix linting issue * Make linter happy * Use abstraction instead of implementation --------- Co-authored-by: Daniel James Smith <djsmith@web.de>
This commit is contained in:
@@ -9,6 +9,7 @@ import { Utils } from "@bitwarden/common/misc/utils";
|
||||
import { EncString } from "@bitwarden/common/models/domain/enc-string";
|
||||
import { CipherWithIdExport as CipherExport } from "@bitwarden/common/models/export/cipher-with-ids.export";
|
||||
import { ExportService } from "@bitwarden/common/services/export.service";
|
||||
import { StateService } from "@bitwarden/common/services/state.service";
|
||||
import { CipherService } from "@bitwarden/common/vault/abstractions/cipher.service";
|
||||
import { FolderService } from "@bitwarden/common/vault/abstractions/folder/folder.service.abstraction";
|
||||
import { CipherType } from "@bitwarden/common/vault/enums/cipher-type";
|
||||
@@ -144,6 +145,7 @@ describe("ExportService", () => {
|
||||
let cipherService: SubstituteOf<CipherService>;
|
||||
let folderService: SubstituteOf<FolderService>;
|
||||
let cryptoService: SubstituteOf<CryptoService>;
|
||||
let stateService: SubstituteOf<StateService>;
|
||||
|
||||
beforeEach(() => {
|
||||
apiService = Substitute.for<ApiService>();
|
||||
@@ -160,7 +162,8 @@ describe("ExportService", () => {
|
||||
cipherService,
|
||||
apiService,
|
||||
cryptoService,
|
||||
cryptoFunctionService
|
||||
cryptoFunctionService,
|
||||
stateService
|
||||
);
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user