i have implemented my own Custom Membership Provider. I recently turned on password encryption.
I initially was using the EncryptPassword(...) and DecryptPassword(...) methods as follows
string encryptedPassword = Convert.ToBase64String(base.EncryptPassword(Convert.ToBase64CharArray(clearPassword))
string decryptedPassword = Convert.ToBase64String(base.EncryptPassword(Convert.ToBase64CharArray(encryptedPassword))
I tested this out using the clearPassword = "test" and everything worked fine. I think happened to try changing the clearPassword = "test1" and it threw an exception!
I checked the problem out alittle more and "test1", "test12", "test123" all failed, but "test1234" worked - I assume my method works with strings of length 2^n where n > 1
I played around with different methods for converting between strings and byte[]s to no avail (using Unicode, UTF8, ASCII, etc).
Can someone tell ...
Go to the complete details ...