zoukankan      html  css  js  c++  java
  • C#生成MD5的方法

     

    public static string GetMD5(string sDataIn)

            {

                MD5CryptoServiceProvider md5 = new MD5CryptoServiceProvider();

                byte[] bytValue, bytHash;

                bytValue = System.Text.Encoding.UTF8.GetBytes(sDataIn);

                bytHash = md5.ComputeHash(bytValue);

                md5.Clear();

                string sTemp = "";

                for (int i = 0; i < bytHash.Length; i++)

                {

                    sTemp += bytHash[i].ToString("X").PadLeft(2, '0');

                }

                return sTemp.ToLower();

            }

  • 相关阅读:
    HTML5标签
    CTF web之旅 45
    CTF web之旅44
    CTF web之旅 43
    CTF web之旅 42
    CTF web之旅41
    CTF web之旅40
    CTF web之旅 39
    CTF web之旅 38
    CTF web之旅 37
  • 原文地址:https://www.cnblogs.com/ycxyyzw/p/2260638.html
Copyright © 2011-2022 走看看