encrypt icon indicating copy to clipboard operation
encrypt copied to clipboard

aes decryption not working as expected

Open Eleftheria-99 opened this issue 3 years ago • 2 comments

Hello I am trying to decrypt an encrypted string in Flutter, that was encrypted in the BE using node. I am using this code `class EncryptData{ //for AES Algorithms static var decrypted;

static decryptAES(plainText){ print("let's decrypt"); final key = Encrypt.Key.fromUtf8('bb5VoDYzc4VXU4MWguptClH0UVdU7BAt'); final iv = Encrypt.IV(Uint8List.fromList("w9Qmp6ZWoV2DKetL".codeUnits)); final encrypter = Encrypt.Encrypter(Encrypt.AES(key,padding: null, mode: Encrypt.AESMode.ctr)); decrypted = encrypter.decrypt(Encrypt.Encrypted.fromUtf8(plainText), iv: iv); print("decrypted is" + decrypted); } }`

The result I am getting is this one : �&^`e��,���s��JP����J�xf}�e��;N#��.� Is there anry other step that I have to do to get the decrypted text ?

Eleftheria-99 avatar Feb 17 '22 18:02 Eleftheria-99

also interested in this issue.

CuriousDev21 avatar Feb 25 '22 09:02 CuriousDev21

Does not seem like there is any support for this? Did you manage to work this out?

anywheresa avatar Mar 23 '23 10:03 anywheresa