Closed chriskooken closed 9 years ago
This is because in your desktop decryption code you get the Pkcs7 padding by default, and in PCLCrypto you picked an algorithm with no padding: PCLCrypto.SymmetricAlgorithm.AesEcb
. If you instead indicate PCLCrypto.SymmetricAlgorithm.AesEcbPcks7
, it works.
We are in the process of gutting a lot of shared functionality in our system and porting it to PCL libraries. I am taking some existing data in our database, and trying to decrypt it with the same algorithm. I get the value back, but there are 16 extra bytes at the end that are just garbage.
See Code below: Old Algorithm using System.Security.Cryptography
Decryption using PCLCrypto
Using the old version: plainTextBuffer is 16 bytes, new version it is 32 bytes.
Help!