ToBase64String And FromBase64String?
Aug 2, 2010I have a crypto class where strings like a passwod or email address are encoded and decoded.
I'm having problems with the ToBase64String and FromBase64String methods.
In the crypto class, the string is encoded first and then converted to a base64 string.
When decoding it, it's first converted from base64string to an byte array which is then decoded.
If I encode a certain email address it and then later I want to decode it again, I get an error.
The error is: "Invalid length for a Base-64 char array."
I tried it first with coding with DES and also tried it with tripleDes, but the result is the same.
This is causing a lot of problems. How can I solve this?
Here is some code:
[Code]...