Skip to content

Allow for asynchronous resolution of crypto library#9

Open
zachgibb wants to merge 1 commit intoindutny:masterfrom
HoardInvest:master
Open

Allow for asynchronous resolution of crypto library#9
zachgibb wants to merge 1 commit intoindutny:masterfrom
HoardInvest:master

Conversation

@zachgibb
Copy link

@zachgibb zachgibb commented May 8, 2018

In React Native, the standard node libraries are not available, so the crypto library needs to be aliased to point to react-native-crypto.

However, in order to re-implement crypto, the Diffie-Hellman methods are pulled in from crypto-browserify/diffie-hellman, which, in turn depends on this project.

This project itself requires crypto, so we have a nice dependency loop which causes the whole thing to crash.

If, on the other hand, we allow for require('crypto') to happen at the time of the call of Rand.prototype._rand, all of the files can get read without introducing a loop and the dependency tree can get sorted out properly.

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

Successfully merging this pull request may close these issues.

1 participant