1.I have java function which encrypt xml file and return encrypted String.
/// Java Class
import java.security.Key;
import javax.crypto.Cipher;
import javax
I believe the blockSize should be 128 and the keysize be 256. The keyStr should be 32 characters long and the IVstr should be 16 characters long. This may help as it describes why 128 bits have to be used for block size and what the key sizes can be. csrc.nist.gov/publications/fips/fips197/fips-197.pdf
You have this in the decrypt method.
aesEncryption.Padding = PaddingMode.None;
I believe you need to put that in the encrypt method also.
Also why not use this method for the key and IV.
aes.Key = ASCIIEncoding.ASCII.GetBytes(keyStr);
aes.IV = ASCIIEncoding.ASCII.GetBytes(ivStr);