예제 #1
0
 public static ComputerSn Instance()
 {
     if (_instance == null)
     {
         _instance = new ComputerSn();
     }
     return(_instance);
 }
예제 #2
0
        public static string md5One()
        {
            ComputerSn CS = ComputerSn.Instance();
            string     cn = FormsAuthentication.HashPasswordForStoringInConfigFile(CS.CpuID, "Md5");
            // string di = FormsAuthentication.HashPasswordForStoringInConfigFile(CS.DiskID, "Md5");
            string        mac = FormsAuthentication.HashPasswordForStoringInConfigFile(CS.MacAddress, "Md5");
            StringBuilder str = new StringBuilder();

            for (int i = 0; i < cn.Length; i++)
            {
                str.Append(cn[i].ToString());
                //  str.Append(di[i].ToString());
                str.Append(mac[i].ToString());
            }
            return(str.ToString());
        }