nodejs crypto module full features
Paul Cowgill
Evan Bacon For more context, something like this would be useful if you're using a library, let's say XYZ.js, that has primarily targeted a node.js env or the browser in the past.
Let's say XYZ.js is fully featured enough that it has a dep of its own, ABC.js, that is also fully featured. And ABC.js is the lib that uses crypto methods from the node core module directly (and that can be browserified).
In order to use XYZ.js in a React Native env, you have to land pretty major changes in the whole chain of libraries in the dep tree, since the current expo-crypto offering doesn't help with polyfilling the node core crypto module globally so it works in any child deps that may use it.
That said, expo-crypto is already very useful in any React Native app that uses it directly! Thanks!
Paul Cowgill
Marcin Czenko Your comment about TweetNaCl.js over in this old feature request is relevant here:
Marcin Czenko
Paul Cowgill: Thanks Paul for mentioning this. I do think tweetnacl is the right choice allowing one to use the same library on the mobile and in the browser. It works pretty good already with React Native, but it would be nice to have it as an official provider for the common crypto primitives. No need to reinvent the wheel. The authors of tweetnacl know the stuff they are doing and I trust they make right choices. Please let me know if I can help with anything.