标签:
.net 代码
using System.Security.Cryptography; /// <summary> /// 返回大写形式的MD5加密 /// </summary> /// <param name="input"></param> /// <returns></returns> public string Md5Upper(string input) { MD5 md5Hasher = MD5.Create(); byte[] data = md5Hasher.ComputeHash(Encoding.UTF8.GetBytes(input)); StringBuilder sBuilder = new StringBuilder(); for (int i = 0; i < data.Length; i++) { sBuilder.Append(data[i].ToString("x2")); } return sBuilder.ToString().ToUpper(); }
标签:
原文地址:http://www.cnblogs.com/sjns/p/5773857.html