Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consider using expo-crypto for crypto instead #24

Closed
pcowgill opened this issue Dec 30, 2019 · 4 comments
Closed

Consider using expo-crypto for crypto instead #24

pcowgill opened this issue Dec 30, 2019 · 4 comments

Comments

@pcowgill
Copy link
Contributor

Consider using expo-crypto for crypto instead of react-native-crypto

Note that the expo-crypto package works in non-Expo React Native apps too.

https://docs.expo.io/versions/latest/sdk/crypto/
https://www.npmjs.com/package/expo-crypto
tradle/react-native-crypto#42

@parshap
Copy link
Owner

parshap commented Dec 30, 2019

If you believe that's a better solution, I'd be happy to accept a PR.

@pcowgill
Copy link
Contributor Author

If you believe that's a better solution, I'd be happy to accept a PR.

Great! I'll test it a bit more locally and open a PR if that seems like the way to go.

FYI, the current README on the npm website for expo-crypto is slightly out of date and misleading as of today, until their next release. Here's an issue that has been resolved about that:
expo/expo#6569

TL;DR: expo-crypto works in both "managed" and "bare" Expo apps as well as vanilla React Native apps.

@pcowgill
Copy link
Contributor Author

I'm wondering about this line from the expo-crypto docs, though: "in an equivalent manner to the Node.js core crypto API"

It may have similar functionality but not attempt to polyfill the API 1:1. I'll keep researching.

@pcowgill
Copy link
Contributor Author

expo-crypto doesn't have the same API as the node core crypto module, so it won't work for a polyfill solution, at least for now

https://expo.canny.io/feature-requests/p/nodejs-crypto-module-full-features

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants