C#MD5为密码加密
byte[] date = Encoding.Unicode.GetBytes(txtPassword.Text.ToCharArray()); MD5CryptoServiceProvider md5 = new MD5CryptoServiceProvider(); byte[] result = md5.ComputeHash(date); string sResult = Encoding.Unicode.GetString(result); string EnPswdStr = FormsAuthentication.HashPasswordForStoringInConfigFile(txtPassword.Text.Trim(), EnPswdStr 为加密的码 txtPassword为TextBox,输入密码的地方
补充:综合编程 , 安全编程 ,