public static string GetUpdateUpData(UpdateUpInfo info) { try { string key = "AwEAAdidHa6npFP1kbXvgITJ+mXzUHTkQVABzOyfpmesYhefJG8vkFm9LlrAX7J4n/X6eLuTEvO41kQ0XKkdOKPT+YMddx4GK2R5CYs41l4DdWarp4AFyUY5XqFyVnpT3Db6uzzvI+Haw0jaeUynaPykNOIcmaDDHP84ZLGNoIOUG5Pj"; string source = JsonHelper.SerializeObject(info); return(AESHelper.EncryptString(source, key)); } catch { return(""); } }
public static List <UpdateInfo> GetUpdateInfos(string version, bool includeData = false) { try { if (version == null) { version = GetVersion(); } UpdateUpInfo updateUpInfo = new UpdateUpInfo(); updateUpInfo.type = type; updateUpInfo.version = version; updateUpInfo.includedata = (includeData ? "Y" : "N"); updateUpInfo.ip = GetServerIp(); updateUpInfo.softCode = new SoftReg().getRNum(); string url = "http://auth.cht.com/web/getupdate/"; string postStr = "data=" + GetUpdateUpData(updateUpInfo); return(JsonHelper.DeserializeJsonToList <UpdateInfo>(WebPost(url, postStr))); } catch (Exception) { return(new List <UpdateInfo>()); } }