You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// 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(leti=0;i<byteArray.length;i++){byteArray[i]=Math.floor(256*Math.random());}},};
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 using react-native-randombytes. It currently uses rn-nodify, generates a bunch of shim code. Could this be used the ReactNativify way, maybe be a better alternative?
Hi, thanks for ReactNativify!
In global.js#L13 the comment mentions:
in transformer.js there is:
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/16Thanks.
PS I have also posted this on stackoverflow: https://stackoverflow.com/q/45301900/8295283
The text was updated successfully, but these errors were encountered: