Home > C# > Encrypting text value using MD5 in Dot Net

Encrypting text value using MD5 in Dot Net

November 20th, 2008 admin Leave a comment Go to comments

For example we will have two textboxes such as ‘TextBox1′ and ‘TextBox2′.Now we will encrypt ‘TextBox1′ value using MD5 in Dot Net and display the encrypted value in ‘TextBox2′.

string pwd = “”;
 
pwd = System.Web.Security.FormsAuthentication.HashPasswordForStoringInConfigFile(TextBox1.Text, “MD5″);
 
TextBox2.Text = pwd;
Categories: C# Tags:
  1. No comments yet.
  1. No trackbacks yet.