leocavalcante / encrypt

🔒 A set of high-level APIs over PointyCastle for two-way cryptography.
BSD 3-Clause "New" or "Revised" License
348 stars 141 forks source link

aes decryption not working as expected #262

Open Eleftheria-99 opened 2 years ago

Eleftheria-99 commented 2 years ago

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 ?

CuriousDev21 commented 2 years ago

also interested in this issue.

anywheresa commented 1 year ago

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