1
0
mirror of https://github.com/bitwarden/browser synced 2026-02-06 11:43:51 +00:00

[PM-24000] Await SdkLoadService.Ready before attempting to use the PureCrypto SDK

This commit is contained in:
Shane
2025-07-22 15:29:53 -07:00
parent c37965174b
commit 9396661cda

View File

@@ -227,12 +227,11 @@ export class EncryptServiceImplementation implements EncryptService {
if (decapsulationKey == null) {
throw new Error("No decapsulationKey provided for decapsulation");
}
await SdkLoadService.Ready;
const keyBytes = PureCrypto.decapsulate_key_unsigned(
encryptedSharedKey.encryptedString,
decapsulationKey,
);
await SdkLoadService.Ready;
return new SymmetricCryptoKey(keyBytes);
}