How can I get access to `crypto`? Is it possible to use rn-nodeify?

Hi there. I need to use code in my client that’s dependent on crypto. Is it possible to use rn-nodeify, browserify or something like them it to package native node modules for use with expo?

Thanks.

Hey @mateodelnorte!

It looks like you’re probably going to have to detach to use https://github.com/brix/crypto-js or crypto… although I think crypto is a deprecated library.

got it. just so I understand - detach is kind of a mix of eject and the full expo process in that you can still use the expo build process, correct?

Basically you should only detach if you need a native module that Expo doesn’t currently support, there are probably other ways of getting crypto to work without detaching, such as writing your own web service.

You should not detach if you need Expo’s push notification services, and you’re not comfortable with writing native code. Detached apps require you to manage Xcode and Android Studio on your own.

We also have https://expo.canny.io where users make feature requests. Here is one that may be relevant to you: Crypto API | Voters | Expo

Let me know if I can help you in any other way

1 Like

I’m running into similar issue as OP. I want to use a package that uses ‘crypto’ and other node std libraries under the hood. Preferring not to eject from expo, how would one go about writing own web service?