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

Update encrypt service abstraction

This commit is contained in:
Bernd Schoolmann
2025-04-23 10:06:58 +02:00
parent 8f690e0c4e
commit 06996406b7

View File

@@ -8,11 +8,11 @@ import { SymmetricCryptoKey } from "../../../platform/models/domain/symmetric-cr
export abstract class EncryptService {
/**
* Encrypts a string or Uint8Array to an EncString
* Encrypts a string to an EncString
* @param plainValue - The value to encrypt
* @param key - The key to encrypt the value with
*/
abstract encrypt(plainValue: string | Uint8Array, key: SymmetricCryptoKey): Promise<EncString>;
abstract encrypt(plainValue: string, key: SymmetricCryptoKey): Promise<EncString>;
/**
* Encrypts a value to a Uint8Array
* @param plainValue - The value to encrypt