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:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user