/// <summary>
 /// 由指定字符串生成硬件信息标识
 /// </summary>
 public static string GetHardwareId(string value)
 {
     value = HashHelper.GetMd5(value).Substring(0, 20).ToUpper().ReverseString();
     string[] strs = new string[5];
     for (int i = 0; i < 5; i++)
     {
         strs[i] = value.Substring(i * 4, 4);
     }
     return(strs.ExpandAndToString("-"));
 }
Exemple #2
0
 /// <summary>
 /// 获取字符串的MD5 Hash值
 /// </summary>
 public static string ToMd5Hash(this string value)
 {
     return(HashHelper.GetMd5(value));
 }