I have a class that inherits SqlMembershipProvider. The following method decrypts password answers.
public string Decrypt(string encryptedStr){
byte[] encryptedBytes = Convert.FromBase64String(encryptedStr);
byte[] decryptedBytes = base.DecryptPassword(encryptedBytes);
string decryptedStr = Encoding.Unicode.GetString(decryptedBytes, 16, decryptedBytes.Length - 16);
return decryptedStr;
}
For testing purposes, I want an Encrypt method. I can't correctly compensate for removing the leading 16 bytes from the decrypted bytes. Does anyone know how to undo the Decrypt method w ...
Go to the complete details ...