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,输入密码的地方

 

相关文章:

  • 2021-07-21
  • 2022-12-23
  • 2022-01-28
  • 2022-12-23
  • 2022-12-23
  • 2022-01-18
  • 2021-12-30
猜你喜欢
  • 2022-12-23
  • 2021-04-05
  • 2021-10-02
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-10-05
相关资源
相似解决方案