Closed
Description
I am trying to get a client-side encryption 🔐 library up and running that works both when Node is a client as well as when the browser is a client.
Unfortunately if I use browserify
it will use crypto-browserify
which quickly bloats my tiny library to render it cumbersome to load 🚂 (like 250k or so minified for the crypto require
statement). I would like this to be faster 🚄 .
I can imagine one of three solutions for this:
- Extend the Node.js's crypto API (send a PR) to be more modular in order to be able to decouple all the ciphers:
this way I would only need to bundle the ciphers that I need.
var createCipher = require('crypto/createCipher')(require('crypto/cipher/aes256'), ...)
- Have an "abstraction"-layer library that works pretty much like the API above except that its not in Node.js and that it falls back on the Node.js implementation. (Does this exist? 🤔 )
- Use a crypto-subset library with a browser implementation. (Have they been tested? 💥 )
How do you approach crypto through npm on the browser?
What are good libraries?
Have there been approaches to make this better in the Node API?
Metadata
Metadata
Assignees
Labels
No labels