/// <summary> /// 服务器列表分页 /// </summary> /// <param name="para"></param> /// <returns></returns> public async Task AddServer(ServerList model) { model.ServerPass = AESDEncrypt.Encrypt(model.ServerPass); await _iserverlistrepository.Insert(model); await _iserverlistrepository.Save(); }
// "mobile:18912341234,18912344321" + //"content:TESTCONTEXT" + //"source:ECCMAlarm"; private string GetEncrypt(HttpContext context) { var jr = new JsonResultModel <List <String> >() { IsSucceed = false, Data = new List <String>(), Msg = "加密失败", RedirectUrl = string.Empty }; List <String> lstData = new List <string>(); String val = "{'mobile':'18607147091','content':'IIIIIIII','source':'ECCMAlarm'}"; string strTest = AESDEncrypt.AESEncrypt(val, "654321"); lstData.Add(strTest); var tmplist = lstData; if (tmplist != null && tmplist.Count > 0) { jr.IsSucceed = true; jr.Data = tmplist; jr.Msg = "加密成功"; } return(JsonConvert.SerializeObject(jr)); }