mirror of
https://github.com/bitwarden/browser
synced 2025-12-16 08:13:42 +00:00
Move admin-console code to new encrypt service interface (#14547)
This commit is contained in:
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user