Closed shin101004 closed 1 year ago
Yeah, since react-native doesn't have crypto.randomBytes
or window.getRandomValues
, you need to supply your own synchronous PRNG with nacl.setPRNG
or use a polyfill, for example this module https://www.npmjs.com/package/react-native-get-random-values (note: I haven't verified if it's correctly and securely implemented).
i use nacl in react-native.
when i use nacl.box.keyPair(), it returns no PRNG error
i read the issue already opened in Issues.
i try to use require and import.
Is there any reason error occurred?