PeculiarVentures / webcrypto

A WebCrypto Polyfill for NodeJS
MIT License
185 stars 23 forks source link

Browser support #34

Closed Igerly closed 3 years ago

Igerly commented 3 years ago

Hello!

I'm trying to use the library in a react app, but getting an error trying to generate basic keys:

cryptoWEBPACK_IMPORTED_MODULE1default.a.generateKeyPairSync is not a function

const crypto = new Crypto(); await crypto.subtle.generateKey( { name: 'ECDH', namedCurve: 'P-256', true, ['deriveBits'] );

Should the webcrypto library actually work in the browser, or have I missed something in the docs?

Igerly commented 3 years ago

Oh, damn, haven't noticed the closed Issue with the same name, sorry.

https://github.com/PeculiarVentures/webcrypto/issues/31