public static string GetKey(int keyType, string productID, string hash) { string key = "" + keyType + productID[0] + SecurityKaraoke.GetMd5Hash(keyType + productID, hash); if (key.Length > 15) { key = key.Substring(0, 15); } return(key.ToUpper()); }
public static string GetProductID(int version, string machine, string functionID, string hash) { string id = SecurityKaraoke.GetMd5Hash(version + machine + functionID, hash); if (id.Length > 5) { id = id.Substring(0, 5); } return(String.Format("{0}{1}{2}{3}", version, machine, functionID, id.ToUpper())); }
public static string GetMachineID(string hash) { string device = getMotherDeviceID(); string machineID = SecurityKaraoke.GetMd5Hash(device, hash); if (machineID.Length > 5) { machineID = machineID.Substring(0, 5); } return(machineID.ToUpper()); }