Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Secure random number generation is not supported by this browser. Use Chrome, Firefox or Internet Explorer 11 #238

Open
martmalo opened this issue Feb 27, 2024 · 0 comments

Comments

@martmalo
Copy link

I encountrd this error:
Secure random number generation is not supported by this browser. Use Chrome, Firefox or Internet Explorer 11

I used Crypto.createDiffieHellman(...) and it worked perfectly, but when I tried Crypto.createDiffieHellman(...).generateKeys() then I got error above.

versions:

"expo": "~49.0.13"
"react-native": "0.72.6"
"react-native-quick-base64": "^2.0.8"
"react-native-quick-crypto": "^0.6.1"

babel.config.js

module.exports = function (api) {
  api.cache(true);
  return {
    presets: ['babel-preset-expo', 'module:metro-react-native-babel-preset'],
    plugins: [
      [
        'module-resolver',
        {
          root: ['./'],
          alias: {
            '@': './src',
            '@env': './src/core/env.js',
            crypto: 'react-native-quick-crypto',
            stream: 'stream-browserify',
            buffer: '@craftzdog/react-native-buffer',
          },
          extensions: [
            '.ios.ts',
            '.android.ts',
            '.ts',
            '.ios.tsx',
            '.android.tsx',
            '.tsx',
            '.jsx',
            '.js',
            '.json',
          ],
        },
      ],
      ['nativewind/babel', { mode: 'compileOnly' }],
      'react-native-reanimated/plugin',
    ],
  };
};
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

No branches or pull requests

1 participant