Add browser support
gnarea opened this issue · 0 comments
Describe the problem
This package uses the Node.js standard library, so it won't work in browsers. Not only are we using Buffer
extensively, but we also rely on Node.js' crypto
module extensively -- and WebCrypto doesn't support certain DNSSEC algorithms like EdDSA.
There may be more compatibility issues.
Describe the solution you'd like
For the cryptographic algorithms, we might want to integrate @peculiar/webcrypto
as it'd use Node.js's crypto
library if running on Node.js. It also has a plugin interface so we could integrate third-party, pure JS implementations of any unsupported algorithm.
It's OK for the solution to introduce breaking changes.
Additional context
We're unlikely to implement this, but would be happy to discuss and review potential implementations from third parties.