[PCLCrypto] Problem with AES Encrypting in WP81

Hi there!

I'm having troubles with a simple AES string encryption with the PCLCrypto library. I'm using the following code to do that.

...
byte[] bytes = Encoding.UTF8.GetBytes(message);
byte[] cipherText = WinRTCrypto.CryptographicEngine.Encrypt(AESKey, bytes, AESIVByte);
string encryptedMessage = System.Convert.ToBase64String(cipherText);

Then in the server side i'm decrypting the content of 'encryptedMessage '. In the iOS and Android, it works like a charm. But in the WP81 platform it does not. When the server is trying to decrypt the information i send it gives me a "Bad Data" error message. Does anyone know how to fix my issue? It is very urgent for me to solve it.

Thanks.

Sign In or Register to comment.