RES_DATA EncryotResponseData <RESULT_T>(string dynamicKey, RESULT_T result) { var response = new RES_DATA { Result = (short)ERROR_CODE.NONE }; var jsonResObject = Jil.JSON.Serialize <RESULT_T>(result); var encryData = AESEncrypt.Encrypt(dynamicKey, jsonResObject); response.Result = (short)ERROR_CODE.NONE; response.Data = encryData; return(response); }
REQUSET_T DecryptRequestData <REQUSET_T>(string dynamicKey, string request) { try { var decryptData = AESEncrypt.Decrypt(dynamicKey, request); var jsonObject = Jil.JSON.Deserialize <REQUSET_T>(decryptData); return(jsonObject); } catch (Exception ex) { CommonServer.FileLogger.Error(ex.ToString()); return(default(REQUSET_T)); } }