mirror of
https://github.com/bitwarden/browser
synced 2026-02-07 20:24:01 +00:00
* Add new encrypt service functions * Undo changes * Cleanup * Fix build * Fix comments * Switch encrypt service to use SDK functions * Move remaining functions to PureCrypto * Tests * Increase test coverage * Enforce sdk.ready and drop unused codepaths * Delete unused code * Add forgotten sdk init logic * Fix build error * Fix browser extension failing to unlock after process reload due to outdated usage of decryptString * Fix send encryption * Fix client key half decryption being stuck * Attempt to fix sharereplay * Fix build * Fix type / add filter / add distinctuntilchange * Fix capitalization
28 lines
1.1 KiB
TypeScript
28 lines
1.1 KiB
TypeScript
import { Decryptable } from "@bitwarden/common/platform/interfaces/decryptable.interface";
|
|
import { InitializerMetadata } from "@bitwarden/common/platform/interfaces/initializer-metadata.interface";
|
|
import { SymmetricCryptoKey } from "@bitwarden/common/platform/models/domain/symmetric-crypto-key";
|
|
|
|
import { ServerConfig } from "../../../platform/abstractions/config/server-config";
|
|
|
|
import { EncryptServiceImplementation } from "./encrypt.service.implementation";
|
|
|
|
/**
|
|
* @deprecated Will be deleted in an immediate subsequent PR
|
|
*/
|
|
export class MultithreadEncryptServiceImplementation extends EncryptServiceImplementation {
|
|
protected useSDKForDecryption: boolean = true;
|
|
|
|
/**
|
|
* Sends items to a web worker to decrypt them.
|
|
* This utilises multithreading to decrypt items faster without interrupting other operations (e.g. updating UI).
|
|
*/
|
|
async decryptItems<T extends InitializerMetadata>(
|
|
items: Decryptable<T>[],
|
|
key: SymmetricCryptoKey,
|
|
): Promise<T[]> {
|
|
return await super.decryptItems(items, key);
|
|
}
|
|
|
|
override onServerConfigChange(newConfig: ServerConfig): void {}
|
|
}
|