react-native-quick-crypto icon indicating copy to clipboard operation
react-native-quick-crypto copied to clipboard

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

Open martmalo opened this issue 1 year ago • 0 comments

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',
    ],
  };
};

martmalo avatar Feb 27 '24 17:02 martmalo