PeculiarVentures / webcrypto-liner

webcrypto-liner is a polyfill that let's down-level User Agents (like IE/Edge) use libraries that depend on WebCrypto. (Keywords: Javascript, WebCrypto, Shim, Polyfill)
MIT License
148 stars 26 forks source link

asmcrypto_js is undefined #80

Closed alexeyorlove closed 3 years ago

alexeyorlove commented 3 years ago

Hey. I am getting error in webcrypto-liner.shim.mjs because _asmcryptojs is undefined.

Because self.asmCrypto is undefined too.

Although I am including both of these packages.

require ("asmcrypto.js")
require ("webcrypto-liner")

But if I connect like this, everything works. But it doesn't look right.

window.asmCrypto = require ("asmcrypto.js")
require ("webcrypto-liner")

How to use this polyfill correctly? Thanks

donskov commented 3 years ago

@alexeyorlove Hello. Now webcrypto-liner uses the global asnCrypto object. Please look at https://github.com/PeculiarVentures/webcrypto-liner/issues/79#issuecomment-668453929

alexeyorlove commented 3 years ago

@donskov thanks!