没有详细研究过暂时贴上代码以便以后研究:

   public static string MD5Encrypt(string strText)
    {
        MD5 md5 = MD5.Create();
        byte[] fromData = Encoding.Default.GetBytes(strText);
        byte[] targetData = md5.ComputeHash(fromData);
        StringBuilder byte2String = new StringBuilder();
        for (int i = 0; i < targetData.Length; i++)
        {
            byte2String.AppendFormat("{0:x2}", targetData[i]);
        }
        return byte2String.ToString();
    }

 

相关文章:

  • 2022-12-23
  • 2021-11-19
  • 2022-01-14
  • 2022-01-26
  • 2022-01-15
  • 2022-12-23
  • 2021-10-01
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-06-05
相关资源
相似解决方案