public string EncryptSourceData(IAopRequest <T> request, string body, string encryptType, string encryptKey, string charset) { EncryptParseItem item = ParseEncryptData(request, body); string bodyIndexContent = body.Substring(0, item.startIndex); string bodyEndContent = body.Substring(item.endIndex); string encryptContent = HttpSDKEncrypt.AesDencrypt(encryptKey, item.encryptContent, charset); return(bodyIndexContent + encryptContent + bodyEndContent); }
public string EncryptSourceData(IAopRequest <T> request, string body, string encryptType, string encryptKey, string charset) { if (!"AES".Equals(encryptType)) { throw new AopException("API only support AES!"); } EncryptParseItem item = parseEncryptData(request, body); string bodyIndexContent = body.Substring(0, item.startIndex); string bodyEndexContent = body.Substring(item.endIndex); //TODO 解密逻辑 string bizContent = HttpSDKEncrypt.AesDencrypt(encryptKey, item.encryptContent, charset); return(bodyIndexContent + bizContent + bodyEndexContent); }