1
0
mirror of https://github.com/bitwarden/browser synced 2026-02-09 21:20:27 +00:00

Add abstract decrypt observable

This commit is contained in:
gbubemismith
2025-03-28 13:53:33 -04:00
parent 10a0bf268b
commit f9e8bdeb45

View File

@@ -3,6 +3,7 @@
import { Observable } from "rxjs";
import { UserKeyRotationDataProvider } from "@bitwarden/key-management";
import { CipherView as SdkCipherView } from "@bitwarden/sdk-internal";
import { UriMatchStrategySetting } from "../../models/domain/domain-service";
import { SymmetricCryptoKey } from "../../platform/models/domain/symmetric-crypto-key";
@@ -32,6 +33,16 @@ export abstract class CipherService implements UserKeyRotationDataProvider<Ciphe
* An empty array indicates that all ciphers were successfully decrypted.
*/
abstract failedToDecryptCiphers$(userId: UserId): Observable<CipherView[]>;
/**
* Decrypts a cipher using the SDK for the given userId.
*
* @param userId The user ID whose key will be used for decryption
* @param cipher The encrypted cipher object
*
* @returns An observable that emits the decrypted cipher view
*/
abstract decrypt$(userId: UserId, cipher: Cipher): Observable<SdkCipherView>;
abstract clearCache(userId: UserId): Promise<void>;
abstract encrypt(
model: CipherView,