7.4.0 • Published 10 months ago
@simplewebauthn/iso-webcrypto v7.4.0
@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 (); // => '43e16416-7a2a-4c00-b2e8-1ea7a57adfb9'
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.