System.Security.Cryptography.CryptographicException: Length of the data to decrypt is invalid Error

Posted by EdA on Stack Overflow See other posts from Stack Overflow or by EdA
Published on 2010-06-06T00:09:00Z Indexed on 2010/06/06 0:12 UTC
Read the original article Hit count: 383

Filed under:
|

I used the code on http://www.obviex.com/samples/Encryption.aspx for encryption/decryption.

I was successful in creating a simple test to functionality encrypt and decrypt data. However, I keep on getting the following error when I test the decrypt function that is used from the Accounts Controller. I am thinking it either has to do with the Machine Code within the Web.config or the the last byte not getting read by the decrypt code.

Error: "Length of the data to decrypt is invalid"

Note: I tried the padding fix I found on the internet and that did not work.

Thanks in advance.

© Stack Overflow or respective owner

Related posts about .NET

Related posts about rijndael