1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-16 00:03:56 +00:00

Move admin-console code to new encrypt service interface (#14547)

This commit is contained in:
Bernd Schoolmann
2025-05-13 15:41:57 +02:00
committed by GitHub
parent 992b1456a8
commit b2c118d607
8 changed files with 18 additions and 9 deletions

View File

@@ -56,14 +56,14 @@ export class ProviderEncryptedOrganizationKey implements BaseEncryptedOrganizati
) {}
async decrypt(encryptService: EncryptService, providerKeys: Record<string, SymmetricCryptoKey>) {
const decValue = await encryptService.decryptToBytes(
const decValue = await encryptService.unwrapSymmetricKey(
new EncString(this.key),
providerKeys[this.providerId],
);
if (decValue == null) {
throw new Error("Failed to decrypt organization key");
}
return new SymmetricCryptoKey(decValue) as OrgKey;
return decValue as OrgKey;
}
get encryptedOrganizationKey() {