I have C# code that is writing to a text file where the password inputted by the user gets encrypted through AES using EasyEncryption. I have both key and iv set to 128bit and encryption works fine. However, when I try to decrypt the password, I keep getting the incomplete block message.
//PASSWORD IS BEING ENCRYPTED BEFORE SAVING TO TEXT FILE
var keyValue = "/A?D(G+KbPeShVkY";
var ivValue = "*G-KaPdSgVkYp3s5";
var pEncryption = EasyEncryption.AES.Encrypt(PASSWORD, keyValue, ivValue);
Console.WriteLine("\nPassword encrypted= " + pEncryption);
file.WriteLine("password=" + pEncryption);
This is the decryption part that gives me the block error
//PASSWORD DECRYPTION
var keyValue = "/A?D(G+KbPeShVkY";
var ivValue = "*G-KaPdSgVkYp3s5";
var dcryPassword = EasyEncryption.AES.Decrypt(data["password"],keyValue, ivValue);