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

Using ReactNativify instead of rn-nodeify? #16

Closed
aschrijver opened this issue Jul 25, 2017 · 4 comments
Closed

Using ReactNativify instead of rn-nodeify? #16

aschrijver opened this issue Jul 25, 2017 · 4 comments

Comments

@aschrijver
Copy link

aschrijver commented Jul 25, 2017

Using react-native-crypto requires rn-nodeify, but on that project README it describes itself as a hack and states:

If you're looking for a saner approach, check out ReactNativify. I haven't tested it myself, but I think philikon will be happy to help.

So my question is: Can we use react-native-crypto this way as well?

ReactNativify code uses crypto-browserify at the moment and in global.js does not offer an example of shimming getRandomValues for use in production.
Changing the crypto: 'crypto-browserify' in babelrc transformer.js crytpo: 'react-native-crypto' on its own doesn't cut it.

I see react-native-crypto generates a bunch of shim code. Maybe be some of that needs to added?

I have asked a similar question on the ReactNativify project: philikon/ReactNativify#10

Thank you.

PS I have also posted this on stackoverflow: https://stackoverflow.com/q/45301900/8295283

@mvayngrib
Copy link
Member

@aschrijver sorry for the slow response. Yes, react-native-crypto requires rn-nodeify. It seems like your question is more about ReactNativify. I don't know enough about ReactNativify to comment on its compatibility with react-native-crypto...so I'm not sure how I can help :)

@aschrijver
Copy link
Author

no problem. i am too busy myself building a non-profit movement for people who care :)
called innercircles

encryption plays an important role..

i found that for more complex nodejs projects both methods are not feasible. instead started researching nodejs on android:

https://stackoverflow.com/questions/45459909/viable-options-for-running-nodejs-on-android-aug-2017

@mvayngrib
Copy link
Member

@aschrijver thanks for the link, i haven't looked at this alternative!

just fyi, we're running a pretty complex crypto project with react-native. It's doable, though were hoops to jump through :) We've created and are using this asyncstorage backend which uses Facebook's Conceal for encryption (on Android), react-native-ecc for elliptic curve signing/verifying and a bunch of other native modules on android and ios (see here).

@aschrijver
Copy link
Author

wow, this seems very cool. i'll not have time for some time to come, but i think @staltz of secure scuttlebot team might be interested as well.

thanks 👍

i'll close this issue now..

ps. in case you find a good solution it would be great if you could add answer to https://stackoverflow.com/questions/45301900/howto-patch-shim-crypto-getrandomvalues-for-react-native, so I bump into it later :)

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