Hello i'm trying to make a simple encrypt,decrypt algorithm and i maked encrypt code correctly,but description code not working
static string Encript(string value)
{
using (MD5CryptoServiceProvider md5 = new MD5CryptoServiceProvider())
{
UTF8Encoding utf8 = new UTF8Encoding();
byte[] data = md5.ComputeHash(utf8.GetBytes(value));
return Convert.ToBase64String(data);
}
}
static string Decript(string value)
{
using (TripleDESCryptoServiceProvider Tdecript = new TripleDESCryptoServiceProvider())
{
UTF8Encoding utf8 = new UTF8Encoding();
byte[] DataToDecrypt = Convert.FromBase64String(value);
return utf8.GetString(DataToDecrypt);
}
}