Can I access MSCrypto from a web worker in IE11?

IE11 Web Crypto is inside window.msCrypto , while for Firefox or Chrome it is available in window.crypto .

Web workers do not have access to the window context, but fortunately Chrome and Firefox also display the crypto variable in the context of the Web Worker (so globally you can use this.crypto to access the Web Crypto package in Web Worker). However, IE11 does not appear to disclose this.msCrypto in the context of a web worker.

It is right? Can I use Web Crypto in the IE11 web desktop?

+5
source share
1 answer

"Support for the Web Crypto API inside the web worker" is an open issue on the Microsoft developer website https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/7607496/

The Web Crypto API is not available inside the web worker. Both "self.crypto" and "self.msCrypto" are undefined within the working context.

I think this is the same problem for IE11, but I did not find the documentation

This thread offers a workaround that changes from a web worker thread to a main thread to perform WebCrypto operations. It is assumed that performance will be lost, and programming is likely to be difficult.

+3
source

All Articles