/// <summary> /// 获取机器码,先获取mac,如果获取mac出错,再获取disk序列号,如果获取disk也出错 /// 获取cpu地址 /// </summary> /// <returns>机器码</returns> public static string GetMachineCode() { //cantgetmac string tmp = GetMac(); if (tmp == null || tmp == string.Empty || tmp == "cantgetmac") { tmp = GetDisk(); if (tmp == null || tmp == string.Empty || tmp == "cantgetdisk") { tmp = GetCpu(); } } FT.Commons.Security.ISecurity md5 = new FT.Commons.Security.MD5Security(); return(md5.Encrypt(tmp)); }
/// <summary> /// 获取机器码,先获取mac,如果获取mac出错,再获取disk序列号,如果获取disk也出错 /// 获取cpu地址 /// </summary> /// <returns>机器码</returns> public static string GetMachineCode() { //cantgetmac string tmp = GetMac(); if (tmp == null || tmp == string.Empty || tmp == "cantgetmac") { tmp = GetDisk(); if (tmp == null || tmp == string.Empty || tmp == "cantgetdisk") { tmp = GetCpu(); } } FT.Commons.Security.ISecurity md5= new FT.Commons.Security.MD5Security(); return md5.Encrypt(tmp); }