-
Notifications
You must be signed in to change notification settings - Fork 16
Open
Description
Hi, thanks for ReactNativify!
In global.js#L13 the comment mentions:
// Don't do this in production. You're going to want to patch in // https://github.com/mvayngrib/react-native-randombytes or similar. global.crypto = { getRandomValues(byteArray) { for (let i = 0; i < byteArray.length; i++) { byteArray[i] = Math.floor(256 * Math.random()); } }, };
in transformer.js there is:
crypto: 'crypto-browserify',
I have 2 questions related to this:
-
What is the proper way to patch in
react-native-randombytes
in production as referred to above? -
There is also a react-natvie-crypto by the same author derived from
crypto-browserify
and usingreact-native-randombytes
. It currently usesrn-nodify
, generates a bunch of shim code. Could this be used the ReactNativify way, maybe be a better alternative?
I have asked the second question on the react-native-crypto
project as well: https://github.com/mvayngrib/react-native-crypto/issues/16
Thanks.
PS I have also posted this on stackoverflow: https://stackoverflow.com/q/45301900/8295283
Metadata
Metadata
Assignees
Labels
No labels