-
Notifications
You must be signed in to change notification settings - Fork 138
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 generating encryption key: [TypeError: Cannot read property 'pbkdf2' of null] #89
Comments
Did you add And |
Yes i did already still the same issue |
Are you still having issues after upgrading to 3.1? |
Yes , So made One kind of patch file to deal with it .
…On Fri, 6 Dec 2024 at 18:13, tectiv3 ***@***.***> wrote:
Are you still having issues after upgrading to 3.1?
—
Reply to this email directly, view it on GitHub
<#89 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/BIJ5LH73CK3BVBDSMHFTMF32EGLX7AVCNFSM6AAAAABMOEH7YCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDKMRTGEZTQMRVGM>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
I came across this issue searching for a solution for a similar error. It appears 'Aes' is null. Simple example: try { LOG init I am on react-native 0.76 and was able to test the DEMO without any issues. However, I noticed that I have the new architecture disabled (since a couple of the modules I am using doesn't fully support it yet). If you add this line to POD file in your DEMO (disabling the new architecture), you can reproduce this issue and the DEMO also fails. ENV['RCT_NEW_ARCH_ENABLED'] = '0' |
@tectiv3 - FYI This may not be the best solution, but I found a fix/workaround to my issue after reading through a bunch of react-native new architecture blogs and others complaining about Native Modules being null. Below is a patch outlining the change I made. I basically had to call out each function in the 'index.js' file, and also change it from 'RTCAes' to just 'Aes.'. However, this breaks Android, so I added a Platform.OS check as well. Note: This is the comment that had my try this approach ...
|
I've renamed the package again, making the naming more consistent. Replaced all RCTAes with Aes. https://github.com/tectiv3/react-native-aes-demo |
in IOS I am able to genrate key by using this way
import Aes from "react-native-aes-crypto";
const generateKey = async (password, salt, cost, length) => Aes.pbkdf2(password, salt, cost, length, "sha256");
The text was updated successfully, but these errors were encountered: