MD5 hash encryption
public static string Md5Encryption(string dataToEncrypt)
{
var bytes = Encoding.Default.GetBytes(dataToEncrypt);
using (var md5 = new MD5CryptoServiceProvider())
{
var cipher = md5.ComputeHash(bytes);
return Convert.ToBase64String(cipher);
}
}



hi, i am new in security concepts of .net.
ReplyDeleteBut i want to learn it
Your articles are great but i got problem to decrypt the string that has been encrypted by MD5.
Could you also post this how could i decrypt the string that is encrypted by MD5
You cannot decrypt MD5 hashes. It is one way encryption. You'd want RSA or Triple DES (or something else) if you want encryption and decryption
ReplyDeleteThanks for this information, it was very helpful. Keep up the good work.
ReplyDeletepgp desktop
There are many different types of encryption used in security of the computers but one that is most strong and efficient is the MD5 Hash. Don't ever forget to include a reference to 'System.Security.Cryptography' in your project, it's a must.
ReplyDelete