- 最后登录
- 2018-5-18
- 注册时间
- 2013-5-24
- 阅读权限
- 20
- 积分
- 197

- 纳金币
- 0
- 精华
- 0
|
public string Md5Sum(string input)
{
System.Security.Cryptography.MD5 md5 = System.Security.Cryptography.MD5.Create();
byte[] inputBytes = System.Text.Encoding.ASCII.GetBytes(input);
byte[] hash = md5.ComputeHash(inputBytes);
StringBuilder sb = new StringBuilder();
for (int i = 0; i < hash.Length; i++)
{
sb.Append(hash[i].ToString("X2"));
}
return sb.ToString();
} |
|