Open ivanpagac opened 6 years ago
Im getting same issue looks like its not finding the brorand library correctly, but you can just pass your own entropy in as an option.
EC.genKeyPair({ entropy: 'some 256 bit string that is random here})
Same issue here..
same issue
same issue here; main problem in dependcy brorand
same issue here
same issue with react native app
yeas, problem is in brorand package. brorand needs crypto package, but it doesnt exist in JSCore, so we need to tell brorand to use react-native-randombytes instead of crypto.randomBytes. this can be fixed via patch-package and manually editing brorand package, by example:
try {
var randBytes = require('react-native-randombytes').randomBytes;
if (typeof randBytes !== 'function')
throw new Error('Not supported');
Rand.prototype._rand = function _rand(n) {
return randBytes(n);
};
} catch (e) {
}
and then patch-package brorand
, so it will create .patch file for brorand.
Hi Guys, trying to create keyPair with
but failing on getKeyPair, probably brorand library failing ? Anyone with this issue? Tried multiple node_modules removal, npm installs. To give you context I am creating react-native app.