tectiv3 / react-native-aes

Native module for AES encryption
MIT License
188 stars 135 forks source link

Error generating encryption key: [TypeError: Cannot read property 'pbkdf2' of null] #89

Open shubh-neorox opened 3 months ago

shubh-neorox commented 3 months ago

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");

but in android I am unable to get it 
getting this error :"Error generating encryption key: [TypeError: Cannot read property 'pbkdf2' of null]"

react native version :0.74
Jonnynsk commented 1 month ago

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");

but in android I am unable to get it 
getting this error :"Error generating encryption key: [TypeError: Cannot read property 'pbkdf2' of null]"

react native version :0.74

Did you add include ':react-native-aes-crypto' project(':react-native-aes-crypto').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-aes-crypto/android') in android/settings.gradle ?

And dependencies { implementation project(':react-native-aes-crypto') } in android/app/build.gradle ?