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
149 stars 26 forks source link

Update to the latest asmcrypto.js #47

Closed jeremyVignelles closed 6 years ago

jeremyVignelles commented 6 years ago

asmcrypto.js seems to have made a few breaking changes in the latest versions, making the default "npm install" broken.

Could you please update your project?

microshine commented 6 years ago

webcrypto-liner uses fixed version of asmcrypto.js https://github.com/PeculiarVentures/webcrypto-liner/blob/master/package.json#L20

I checked npm install webcrypto-liner. It works

jeremyVignelles commented 6 years ago

I was having undefined references to asmcrypto... weird... Probably something wrong on my side.

Jack-Works commented 4 years ago

TypeError: Cannot read property 'bytes' of undefined

  at Function.digest (node_modules/webcrypto-liner/build/webcrypto-liner.shim.js:10503:19)   
  at Sha256Provider.onDigest (node_modules/webcrypto-liner/build/webcrypto-liner.shim.js:10516:24)
  at Sha256Provider.<anonymous> (node_modules/webcrypto-liner/build/webcrypto-liner.shim.js:403:30)

When using the asmcrypto lib on npm. require('asmcrypto.js/asmcrypto.all.es8')

Jack-Works commented 4 years ago

Including a fixed(compressed) version of asmcrypto will make us can not pass the security audit, please publish a forked version of asmcrypto that will work with webcrypto-liner thanks!

microshine commented 4 years ago

Please try

<script src="https://cdnjs.cloudflare.com/ajax/libs/asmCrypto/2.3.2/asmcrypto.all.es5.min.js"></script>
Jack-Works commented 4 years ago

Please try

<script src="https://cdnjs.cloudflare.com/ajax/libs/asmCrypto/2.3.2/asmcrypto.all.es5.min.js"></script>

I'm writing test for the project so the code is running in the node. And you said web-crypto liner is using a "fixed" version of asmcrypto. I have tried the official asmcrypto package, it doesn't work well with the liner