@simplewebauthn/iso-webcrypto
A small library for accessing a runtime's WebCrypto API. Supports browsers, and Node projects using ESM and/or CommonJS.
This library is not officially supported for use outside of SimpleWebAuthn!
Install
npm install --save @simplewebauthn/iso-webcrypto
Usage
import WebCrypto from '@simplewebauthn/iso-webcrypto';
WebCrypto.randomUUID ();
Acknowledgements
Thank you to Fabio Spampinato and their tiny-webcrypto project that all but solves the issue of isomorphic WebCrypto use across browsers and Node. I forked that project and made this one to add in support for Node libraries written in TypeScript that transpile to CommonJS modules.