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

Error: Native crypto module could not be used to get secure random number. (React-Native) #425

Open
pushpender-singh-ap opened this issue May 20, 2022 · 1 comment

Comments

@pushpender-singh-ap
Copy link

react-native: 0.66.4
crypto-js: ^4.1.1

import CryptoJS from "crypto-js";
---
var ciphertext = CryptoJS.AES.encrypt("HEY GOOGLE", 'secret key 123').toString();
console.log(ciphertext);

var bytes = CryptoJS.AES.decrypt(ciphertext, 'secret key 123');
var originalText = bytes.toString(CryptoJS.enc.Utf8);
console.log(originalText);
---
 ERROR  Error: Native crypto module could not be used to get secure random number.

Screenshot_1653045749

@agusnuryady
Copy link

crypto-js now works on RN 0.64, see #259 (comment) for detail

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

2 participants