AES Encryption in Java and Decryption in C#
Your code has one big problem: It is mixing the character encodings! In Java you are calling key.getBytes(), without arguments. This method returns the UTF-8 or CP1252/ISO 8859-1 encoded data depending on your operating system and the default charset in Java. On C# side you are using Encoding.Unicode.GetBytes(key) – “Unicode” in .Net is a synonym … Read more