Encryption Error “Length of the data to decrypt is invalid”

Posted by:

So, last week we were beating our heads against a wall trying to figure out why we could not decrypt encrypted XML files supplied by our client along with the decryption algorithm.

We tried to rewrite the decryption method, researched the Rijndael Cryptography, tried other test files. We even encrypted our own files and then decrypted them with ease… so the decryption works. But, no matter what we did, we got the following error trying to decrypt the client supplied files:

System.Security.Cryptography.CryptographicException ...

Continue Reading →
0