Null check error in web worker when using RsaOaepPrivateKey.importPkcs8Key
for RSA decryption
#149
Labels
RsaOaepPrivateKey.importPkcs8Key
for RSA decryption
#149
Description
I'm using this package for RSA decryption in both isolates and web workers. While it works fine in isolates, I encounter a null check error when running in a web worker.
Code
This is the function that runs for decryption:
Error
This is the error I get in the web worker:
From what I can tell, the error is being thrown on this line:
Environment
Steps to Reproduce
decryptDEKWeb
function inside a web worker environment.RsaOaepPrivateKey.importPkcs8Key
.Expected Behavior
The function should successfully import the private key and decrypt the data, as it does in an isolate.
Additional Information
keyData
passed toimportPkcs8Key
is valid, as confirmed by logging it before the function call.Let me know if any further details are required for debugging.
The text was updated successfully, but these errors were encountered: