Categories: MSDN / DotNet / Java / Scripts / Linux / PHP Ask - La ask - La Answer

Decrypting Data?

Hi
I want to encrypt and decrypt data, and in one of ASP.net Starter Kits, i found that you can encrypt using the following method:

public static string Encrypt(string cleanString)
{
Byte[] clearBytes = new UnicodeEncoding().GetBytes(cleanString);
Byte[] hashedBytes = ((HashAlgorithm)CryptoConfig.CreateFromName("MD5")).ComputeHash(clearBytes);

return BitConverter.ToString(hashedBytes);

}
string EncryptedData = Encrypt(CleanData);

My problem is that i cannot decrypt the data, anyone has any ideas?
[558 byte] By [Thagi] at [2007-11-11 8:18:09]
# 1 Re: Decrypting Data?
MD5 is a hashing algorithm; there's no way to decrypt it. Try this: http://www.c-sharpcorner.com/Code/2004/July/CryptographyInDotNET.asp
Phil Weber at 2007-11-11 21:47:44 >