tectiv3 / react-native-aes

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

plz help decrypt failed #68

Open fukemy opened 2 years ago

fukemy commented 2 years ago

can u help, i dont know why failed:

message:

nVyCnCGpIxSE7Mpbfuj4Cdx4YRkkssxiZ1kZxVNuOMtBpd+CmzYGcDoZyWUwL41yWWONDVxewotexteCgXqhH7WV+ObGw0QADmjgygHd0C4kCCmQgNPjxWwb2q7FdzGwOCMkRoQByQyEXN3L176nlSNmT4GW9GAd3hf/JLFtlf0=', 'UjUzb3NKdmczeW9JVEM1NzYwc1hhU09wVlpzeXg2UEFnOFpNVytwZThoaz0=

key:

UjUzb3NKdmczeW9JVEM1NzYwc1hhU09wVlpzeXg2UEFnOFpNVytwZThoaz0=

iv:

UjUzb3NKdmczeW9J
plafferty64830 commented 2 years ago

can u help, i dont know why failed:

message:

nVyCnCGpIxSE7Mpbfuj4Cdx4YRkkssxiZ1kZxVNuOMtBpd+CmzYGcDoZyWUwL41yWWONDVxewotexteCgXqhH7WV+ObGw0QADmjgygHd0C4kCCmQgNPjxWwb2q7FdzGwOCMkRoQByQyEXN3L176nlSNmT4GW9GAd3hf/JLFtlf0=', 'UjUzb3NKdmczeW9JVEM1NzYwc1hhU09wVlpzeXg2UEFnOFpNVytwZThoaz0=

key:

UjUzb3NKdmczeW9JVEM1NzYwc1hhU09wVlpzeXg2UEFnOFpNVytwZThoaz0=

iv:

UjUzb3NKdmczeW9J

@fukemy I was facing this issue as well and I've just fixed it. Aes.decrypt is a promise and should be executed as follows:

Aes.decrypt(encryptedData.cipher, key, encryptedData.iv, 'aes-256-cbc').then((text) => { //do something with your decrypted text... const decrypted = text; });

gasparnd commented 1 year ago

can u help, i dont know why failed:

message:

nVyCnCGpIxSE7Mpbfuj4Cdx4YRkkssxiZ1kZxVNuOMtBpd+CmzYGcDoZyWUwL41yWWONDVxewotexteCgXqhH7WV+ObGw0QADmjgygHd0C4kCCmQgNPjxWwb2q7FdzGwOCMkRoQByQyEXN3L176nlSNmT4GW9GAd3hf/JLFtlf0=', 'UjUzb3NKdmczeW9JVEM1NzYwc1hhU09wVlpzeXg2UEFnOFpNVytwZThoaz0=

key:

UjUzb3NKdmczeW9JVEM1NzYwc1hhU09wVlpzeXg2UEFnOFpNVytwZThoaz0=

iv:

UjUzb3NKdmczeW9J

Could do you send your implementation of the decrypt method?