纳金网
标题:
unity3d md5加密算法
[打印本页]
作者:
lp5131427
时间:
2013-5-29 17:40
标题:
unity3d md5加密算法
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();
}
作者:
艾西格亚
时间:
2013-5-30 01:30
感谢分享!
作者:
zhang
时间:
2013-6-21 15:20
学习一下,感谢分享!
欢迎光临 纳金网 (http://go.narkii.com/club/)
Powered by Discuz! X2.5