Simple module for secure random number generation in NodeJS, Browser and React Native.
yarn add universal-secure-random
For generation secure random numbers on React Native react-native-get-random-values
is required.
No need to import it directly. It will use the library automatically.
yarn add react-native-get-random-values
import { randomBytes } from 'universal-secure-random';
let bytes: UInt8Array = randomBytes(32);