此项目下载地址:git项目下载
Springboot中RequestBodyAdvice与ResponseBodyAdvice文档地址: 阅读文档
1.RequestBodyAdvice 是对请求响应的json串进行处理,一般使用环境是处理解密的json串。
需要在controller层中调用方法上加入@RequestMapping和@RequestBody;后者若没有,则RequestBodyAdvice实现方法不执行。
2.ResponseBodyAdvice是对请求响应后对结果的处理,一般使用环境是处理加密的json串。
需要在controller层中调用方法上加入@RequstMapping和@ResponseBody;后者若没有,则ResponseBodyAdvice实现方法不执行。
在此文章中作者采用对json串进行RSA加密解密的方式,自定义一注解,进行判断是否需要对json参数进行加密解密的处理,即是否执行以上()两个实现方法。代码如下:
package com.web.annotation;
import org.springframework.web.bind.annotation.Mapping;
import java.lang.annotation.*;
/**
* @Author: Mr.Yan
* @create: 2019/3/28
* @description: 是否加密注解
*/
@Target({ElementType.METHOD,ElementType.TYPE})
@Retention(RetentionPolicy.RUNTIME)
@Mapping
@Documented
/*@Target(ElementType.PARAMETER)
@Retention(RetentionPolicy.RUNTIME)*/
public @interface SecurityParameter {
/**
* 入参是否解密,默认解密
*/
boolean inDecode() default true;
/**
* 出参是否加密,默认加密
*/
boolean outEncode() default true;
}
package com.web.filter.bodyAdviceFilter;
import com.web.annotation.SecurityParameter;
import com.web.properties.ReadProBean;
import com.web.util.rsaUtil.RSAUtils;
import lombok.extern.slf4j.Slf4j;
import net.sf.json.JSONObject;
import org.apache.commons.io.IOUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.core.MethodParameter;
import org.springframework.http.HttpHeaders;
import org.springframework.http.HttpInputMessage;
import org.springframework.http.converter.HttpMessageConverter;
import org.springframework.web.bind.annotation.ControllerAdvice;
import org.springframework.web.servlet.mvc.method.annotation.RequestBodyAdvice;
import java.io.*;
import java.lang.reflect.Type;
/**
* @author : Mr.Yan
* @program : com
* @create : 2019-03-27 18:12
* @description : 对 @RequstMapping 中 初始化解密动作
*/
@Slf4j
@ControllerAdvice
public class DecodeRequestBodyAdvice implements RequestBodyAdvice {
/**
* 加载配置文件信息
*/
@Autowired
private ReadProBean readProBean;
@Override
public boolean supports(MethodParameter methodParameter, Type type, Class<? extends HttpMessageConverter<?>> aClass) {
//这里设置成false 它就不会再走这个类了
return methodParameter.getMethod().isAnnotationPresent(SecurityParameter.class);
}
@Override
public HttpInputMessage beforeBodyRead(HttpInputMessage httpInputMessage, MethodParameter methodParameter, Type type, Class<? extends HttpMessageConverter<?>> aClass) {
try {
log.info("开始对接受值进行解密操作");
// 定义是否解密
boolean encode = false;
//获取注解配置的包含和去除字段
SecurityParameter serializedField = methodParameter.getMethodAnnotation(SecurityParameter.class);
//入参是否需要解密
encode = serializedField.inDecode();
log.info("对方法method :【" + methodParameter.getMethod().getName() + "】数据进行解密!");
return new MyHttpInputMessage(httpInputMessage, encode);
} catch (IOException e) {
e.printStackTrace();
log.error("对方法method :【" + methodParameter.getMethod().getName() + "】数据进行解密出现异常:" + e.getMessage());
throw new RuntimeException("对方法method :【" + methodParameter.getMethod().getName() + "】数据进行解密出现异常:" + e.getMessage());
}
}
@Override
public Object afterBodyRead(Object o, HttpInputMessage httpInputMessage, MethodParameter methodParameter, Type type, Class<? extends HttpMessageConverter<?>> aClass) {
return o;
}
@Override
public Object handleEmptyBody(Object o, HttpInputMessage httpInputMessage, MethodParameter methodParameter, Type type, Class<? extends HttpMessageConverter<?>> aClass) {
return o;
}
//这里实现了HttpInputMessage 封装一个自己的HttpInputMessage
class MyHttpInputMessage implements HttpInputMessage {
HttpHeaders headers;
InputStream body;
public MyHttpInputMessage(HttpInputMessage httpInputMessage, boolean encode) throws IOException {
this.headers = httpInputMessage.getHeaders();
// 解密操作
this.body = decryptBody(httpInputMessage.getBody(), encode);
}
@Override
public InputStream getBody() {
return body;
}
@Override
public HttpHeaders getHeaders() {
return headers;
}
}
/**
* 对流进行解密操作
*
* @param in
* @return
*/
public InputStream decryptBody(InputStream in, Boolean encode) throws IOException {
try {
// 获取 json 字符串
String bodyStr = IOUtils.toString(in, "UTF-8");
if (StringUtils.isEmpty(bodyStr)) {
throw new RuntimeException("无任何参数异常!");
}
// 获取 inputData 加密串
String inputData = JSONObject.fromObject(bodyStr).get(readProBean.getRequestInput()).toString();
// 验证是否为空
if (StringUtils.isEmpty(inputData)) {
throw new RuntimeException("参数【" + readProBean.getRequestInput() + "】缺失");
} else {
// 是否解密
if (!encode) {
log.info("没有解密标识不进行解密!");
return IOUtils.toInputStream(inputData, "UTF-8");
}
// 开始解密
log.info("对加密串开始解密操作!");
String decryptBody = null;
try {
decryptBody = RSAUtils.decryptDataOnJava(inputData, readProBean.getPrivateKey());
log.info("操作结束!");
return IOUtils.toInputStream(decryptBody, "UTF-8");
} catch (Exception e) {
e.printStackTrace();
throw new RuntimeException("RSA解密异常:" + e.getMessage());
}
}
} catch (IOException e) {
e.printStackTrace();
throw new RuntimeException("获取参数【" + readProBean.getRequestInput() + "】异常:" + e.getMessage());
}
}
}
package com.web.filter.bodyAdviceFilter;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.web.annotation.SecurityParameter;
import com.web.properties.ReadProBean;
import com.web.util.rsaUtil.RSAUtils;
import lombok.extern.slf4j.Slf4j;
import net.sf.json.JSONObject;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.core.MethodParameter;
import org.springframework.http.MediaType;
import org.springframework.http.server.ServerHttpRequest;
import org.springframework.http.server.ServerHttpResponse;
import org.springframework.web.bind.annotation.ControllerAdvice;
import org.springframework.web.servlet.mvc.method.annotation.ResponseBodyAdvice;
import java.io.IOException;
/**
* @author : Mr.Yan
* @program : com
* @create : 2019-03-27 18:41
* @description : 对 @RequestMapping 返回值进行加密
*/
@Slf4j
@ControllerAdvice
public class EncodeResponseBodyAdvice implements ResponseBodyAdvice {
/**
* 加载配置文件信息
*/
@Autowired
private ReadProBean readProBean;
@Override
public boolean supports(MethodParameter methodParameter, Class aClass) {
//这里设置成false 它就不会再走这个类了
return methodParameter.getMethod().isAnnotationPresent(SecurityParameter.class);
}
@Override
public Object beforeBodyWrite(Object body, MethodParameter methodParameter, MediaType mediaType, Class aClass, ServerHttpRequest serverHttpRequest, ServerHttpResponse serverHttpResponse) {
try {
log.info("开始对返回值进行加密操作!");
// 定义是否解密
boolean encode = false;
//获取注解配置的包含和去除字段
SecurityParameter serializedField = methodParameter.getMethodAnnotation(SecurityParameter.class);
//入参是否需要解密
encode = serializedField.outEncode();
log.info("对方法method :【" + methodParameter.getMethod().getName() + "】数据进行加密!");
return encryptedBody(body, encode);
} catch (IOException e) {
e.printStackTrace();
log.error("对方法method :【" + methodParameter.getMethod().getName() + "】数据进行加密出现异常:" + e.getMessage());
throw new RuntimeException("对方法method :【" + methodParameter.getMethod().getName() + "】数据进行加密出现异常:" + e.getMessage());
}
}
public Object encryptedBody(Object body, Boolean encode) throws IOException {
try {
ObjectMapper objectMapper = new ObjectMapper();
String result = objectMapper.writerWithDefaultPrettyPrinter().writeValueAsString(body);
if (!encode) {
log.info("没有加密表示不进行加密!");
return body;
}
log.info("对字符串开始加密!");
try {
String outputData = RSAUtils.encryptedDataOnJava(result, readProBean.getPublicKey());
JSONObject json = new JSONObject();
json.put(readProBean.getResponseOutput(), outputData);
log.info("操作结束!");
return json;
} catch (Exception e) {
e.printStackTrace();
throw new RuntimeException("对返回数据加密出现异常:" + e.getMessage());
}
} catch (JsonProcessingException e) {
e.printStackTrace();
throw new RuntimeException("获取返回值出现异常:" + e.getMessage());
}
}
}
package com.web.util.rsaUtil;
import org.apache.tomcat.util.codec.binary.Base64;
import javax.crypto.Cipher;
import java.io.ByteArrayOutputStream;
import java.security.*;
import java.security.interfaces.RSAPrivateKey;
import java.security.interfaces.RSAPublicKey;
import java.security.spec.PKCS8EncodedKeySpec;
import java.security.spec.X509EncodedKeySpec;
import java.util.HashMap;
import java.util.Map;
/** */
/**
* <p>
* RSA公钥/私钥/签名工具包
* </p>
* <p>
* 罗纳德·李维斯特(Ron [R]ivest)、阿迪·萨莫尔(Adi [S]hamir)和伦纳德·阿德曼(Leonard [A]dleman)
* </p>
* <p>
* 字符串格式的密钥在未在特殊说明情况下都为BASE64编码格式<br/>
* 由于非对称加密速度极其缓慢,一般文件不使用它来加密而是使用对称加密,<br/>
* 非对称加密算法可以用来对对称加密的密钥加密,这样保证密钥的安全也就保证了数据的安全
* </p>
*
* @author monkey
* @date 2018-10-29
*/
public class RSAUtils {
/** */
/**
* 加密算法RSA
*/
public static final String KEY_ALGORITHM = "RSA";
/** */
/**
* 签名算法
*/
public static final String SIGNATURE_ALGORITHM = "MD5withRSA";
/** */
/**
* 获取公钥的key
*/
private static final String PUBLIC_KEY = "RSAPublicKey";
/** */
/**
* 获取私钥的key
*/
private static final String PRIVATE_KEY = "RSAPrivateKey";
/** */
/**
* RSA最大加密明文大小
*/
private static final int MAX_ENCRYPT_BLOCK = 117;
/** */
/**
* RSA最大解密密文大小
*/
private static final int MAX_DECRYPT_BLOCK = 128;
/** */
/**
* RSA 位数 如果采用2048 上面最大加密和最大解密则须填写: 245 256
*/
private static final int INITIALIZE_LENGTH = 1024;
/** */
/**
* <p>
* 生成密钥对(公钥和私钥)
* </p>
*
* @return
* @throws Exception
*/
public static Map<String, Object> genKeyPair() throws Exception {
KeyPairGenerator keyPairGen = KeyPairGenerator.getInstance(KEY_ALGORITHM);
keyPairGen.initialize(INITIALIZE_LENGTH);
KeyPair keyPair = keyPairGen.generateKeyPair();
RSAPublicKey publicKey = (RSAPublicKey) keyPair.getPublic();
RSAPrivateKey privateKey = (RSAPrivateKey) keyPair.getPrivate();
Map<String, Object> keyMap = new HashMap<String, Object>(2);
keyMap.put(PUBLIC_KEY, publicKey);
keyMap.put(PRIVATE_KEY, privateKey);
return keyMap;
}
/** */
/**
* <p>
* 用私钥对信息生成数字签名
* </p>
*
* @param data
* 已加密数据
* @param privateKey
* 私钥(BASE64编码)
*
* @return
* @throws Exception
*/
public static String sign(byte[] data, String privateKey) throws Exception {
byte[] keyBytes = Base64.decodeBase64(privateKey);
PKCS8EncodedKeySpec pkcs8KeySpec = new PKCS8EncodedKeySpec(keyBytes);
KeyFactory keyFactory = KeyFactory.getInstance(KEY_ALGORITHM);
PrivateKey privateK = keyFactory.generatePrivate(pkcs8KeySpec);
Signature signature = Signature.getInstance(SIGNATURE_ALGORITHM);
signature.initSign(privateK);
signature.update(data);
return Base64.encodeBase64String(signature.sign());
}
/** */
/**
* <p>
* 校验数字签名
* </p>
*
* @param data
* 已加密数据
* @param publicKey
* 公钥(BASE64编码)
* @param sign
* 数字签名
*
* @return
* @throws Exception
*
*/
public static boolean verify(byte[] data, String publicKey, String sign) throws Exception {
byte[] keyBytes = Base64.decodeBase64(publicKey);
X509EncodedKeySpec keySpec = new X509EncodedKeySpec(keyBytes);
KeyFactory keyFactory = KeyFactory.getInstance(KEY_ALGORITHM);
PublicKey publicK = keyFactory.generatePublic(keySpec);
Signature signature = Signature.getInstance(SIGNATURE_ALGORITHM);
signature.initVerify(publicK);
signature.update(data);
return signature.verify(Base64.decodeBase64(sign));
}
/** */
/**
* <P>
* 私钥解密
* </p>
*
* @param encryptedData
* 已加密数据
* @param privateKey
* 私钥(BASE64编码)
* @return
* @throws Exception
*/
public static byte[] decryptByPrivateKey(byte[] encryptedData, String privateKey) throws Exception {
byte[] keyBytes = Base64.decodeBase64(privateKey);
PKCS8EncodedKeySpec pkcs8KeySpec = new PKCS8EncodedKeySpec(keyBytes);
KeyFactory keyFactory = KeyFactory.getInstance(KEY_ALGORITHM);
Key privateK = keyFactory.generatePrivate(pkcs8KeySpec);
Cipher cipher = Cipher.getInstance(keyFactory.getAlgorithm());
cipher.init(Cipher.DECRYPT_MODE, privateK);
int inputLen = encryptedData.length;
ByteArrayOutputStream out = new ByteArrayOutputStream();
int offSet = 0;
byte[] cache;
int i = 0;
// 对数据分段解密
while (inputLen - offSet > 0) {
if (inputLen - offSet > MAX_DECRYPT_BLOCK) {
cache = cipher.doFinal(encryptedData, offSet, MAX_DECRYPT_BLOCK);
} else {
cache = cipher.doFinal(encryptedData, offSet, inputLen - offSet);
}
out.write(cache, 0, cache.length);
i++;
offSet = i * MAX_DECRYPT_BLOCK;
}
byte[] decryptedData = out.toByteArray();
out.close();
return decryptedData;
}
/** */
/**
* <p>
* 公钥解密
* </p>
*
* @param encryptedData
* 已加密数据
* @param publicKey
* 公钥(BASE64编码)
* @return
* @throws Exception
*/
public static byte[] decryptByPublicKey(byte[] encryptedData, String publicKey) throws Exception {
byte[] keyBytes = Base64.decodeBase64(publicKey);
X509EncodedKeySpec x509KeySpec = new X509EncodedKeySpec(keyBytes);
KeyFactory keyFactory = KeyFactory.getInstance(KEY_ALGORITHM);
Key publicK = keyFactory.generatePublic(x509KeySpec);
Cipher cipher = Cipher.getInstance(keyFactory.getAlgorithm());
cipher.init(Cipher.DECRYPT_MODE, publicK);
int inputLen = encryptedData.length;
ByteArrayOutputStream out = new ByteArrayOutputStream();
int offSet = 0;
byte[] cache;
int i = 0;
// 对数据分段解密
while (inputLen - offSet > 0) {
if (inputLen - offSet > MAX_DECRYPT_BLOCK) {
cache = cipher.doFinal(encryptedData, offSet, MAX_DECRYPT_BLOCK);
} else {
cache = cipher.doFinal(encryptedData, offSet, inputLen - offSet);
}
out.write(cache, 0, cache.length);
i++;
offSet = i * MAX_DECRYPT_BLOCK;
}
byte[] decryptedData = out.toByteArray();
out.close();
return decryptedData;
}
/** */
/**
* <p>
* 公钥加密
* </p>
*
* @param data
* 源数据
* @param publicKey
* 公钥(BASE64编码)
* @return
* @throws Exception
*/
public static byte[] encryptByPublicKey(byte[] data, String publicKey) throws Exception {
byte[] keyBytes = Base64.decodeBase64(publicKey);
X509EncodedKeySpec x509KeySpec = new X509EncodedKeySpec(keyBytes);
KeyFactory keyFactory = KeyFactory.getInstance(KEY_ALGORITHM);
Key publicK = keyFactory.generatePublic(x509KeySpec);
// 对数据加密
Cipher cipher = Cipher.getInstance(keyFactory.getAlgorithm());
cipher.init(Cipher.ENCRYPT_MODE, publicK);
int inputLen = data.length;
ByteArrayOutputStream out = new ByteArrayOutputStream();
int offSet = 0;
byte[] cache;
int i = 0;
// 对数据分段加密
while (inputLen - offSet > 0) {
if (inputLen - offSet > MAX_ENCRYPT_BLOCK) {
cache = cipher.doFinal(data, offSet, MAX_ENCRYPT_BLOCK);
} else {
cache = cipher.doFinal(data, offSet, inputLen - offSet);
}
out.write(cache, 0, cache.length);
i++;
offSet = i * MAX_ENCRYPT_BLOCK;
}
byte[] encryptedData = out.toByteArray();
out.close();
return encryptedData;
}
/** */
/**
* <p>
* 私钥加密
* </p>
*
* @param data
* 源数据
* @param privateKey
* 私钥(BASE64编码)
* @return
* @throws Exception
*/
public static byte[] encryptByPrivateKey(byte[] data, String privateKey) throws Exception {
byte[] keyBytes = Base64.decodeBase64(privateKey);
PKCS8EncodedKeySpec pkcs8KeySpec = new PKCS8EncodedKeySpec(keyBytes);
KeyFactory keyFactory = KeyFactory.getInstance(KEY_ALGORITHM);
Key privateK = keyFactory.generatePrivate(pkcs8KeySpec);
Cipher cipher = Cipher.getInstance(keyFactory.getAlgorithm());
cipher.init(Cipher.ENCRYPT_MODE, privateK);
int inputLen = data.length;
ByteArrayOutputStream out = new ByteArrayOutputStream();
int offSet = 0;
byte[] cache;
int i = 0;
// 对数据分段加密
while (inputLen - offSet > 0) {
if (inputLen - offSet > MAX_ENCRYPT_BLOCK) {
cache = cipher.doFinal(data, offSet, MAX_ENCRYPT_BLOCK);
} else {
cache = cipher.doFinal(data, offSet, inputLen - offSet);
}
out.write(cache, 0, cache.length);
i++;
offSet = i * MAX_ENCRYPT_BLOCK;
}
byte[] encryptedData = out.toByteArray();
out.close();
return encryptedData;
}
/** */
/**
* <p>
* 获取私钥
* </p>
*
* @param keyMap
* 密钥对
* @return
* @throws Exception
*/
public static String getPrivateKey(Map<String, Object> keyMap) throws Exception {
Key key = (Key) keyMap.get(PRIVATE_KEY);
return Base64.encodeBase64String(key.getEncoded());
}
/** */
/**
* <p>
* 获取公钥
* </p>
*
* @param keyMap
* 密钥对
* @return
* @throws Exception
*/
public static String getPublicKey(Map<String, Object> keyMap) throws Exception {
Key key = (Key) keyMap.get(PUBLIC_KEY);
return Base64.encodeBase64String(key.getEncoded());
}
/**
* java端公钥加密
*/
public static String encryptedDataOnJava(String data, String PUBLICKEY) {
try {
data = Base64.encodeBase64String(encryptByPublicKey(data.getBytes(), PUBLICKEY));
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
return data;
}
/**
* java端私钥解密
*/
public static String decryptDataOnJava(String data, String PRIVATEKEY) {
String temp = "";
try {
byte[] rs = Base64.decodeBase64(data);
temp = new String(RSAUtils.decryptByPrivateKey(rs, PRIVATEKEY));
} catch (Exception e) {
e.printStackTrace();
}
return temp;
}
}
package com.web.controller;
import com.web.annotation.SecurityParameter;
import com.web.util.resultUtil.ResultModel;
import com.web.util.resultUtil.ResultTools;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.HashMap;
import java.util.Map;
/**
* @author : Mr.Yan
* @program : com
* @create : 2019-03-27 17:58
* @description :
*/
@Slf4j
@RestController
public class LoginController {
/**
* @Author: Mr.Yan
* @create: 2019/3/27
* @MethodName: login
* @Param: [response, request]
* @Return: net.sf.json.JSONObject
* @description: 自动对参数加密解密
*/
@SecurityParameter(inDecode = false,outEncode = false)
@RequestMapping("/login")
public ResultModel login( HttpServletResponse response, HttpServletRequest request,
@RequestBody(required = false) Map<String,Object> map){
log.info("进入login后台");
System.out.println("输出account:————————————————" + map.get("account"));
System.out.println("输出password:————————————————" + map.get("password"));
Map<String,Object> resultMap = new HashMap<>();
resultMap.put("userid","200");
return ResultTools.result(0,"",resultMap);
}
}
package com.web.properties;
import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;
/**
* @author : Mr.Yan
* @program : com
* @create : 2019-03-28 09:30
* @description : 读取配置文件Bean
*/
@Data
@Component
@ConfigurationProperties(prefix = "rsa")
public class ReadProBean {
/**
* RSA 加密定义公钥
*/
private String publicKey;
/**
* RSA 加密定义私钥
*/
private String privateKey;
/**
* 前台发送的加密的json串命名
*/
private String requestInput;
/**
* 后台发送的加密的json串命名
*/
private String responseOutput;
}
application.properties文件中配置
# rsa 加密公钥
rsa.publicKey = MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCowwu8ftM+/PPlG5sNFjFtiNG4zsMCRTmfQuMXK6B6YV9Fs1k9a6z6sUVOsqvC2f3QecaOt2obNs8UdPw/EleOcYk/8Z7asVVJcARcYHiQ8NkBUmPyUQKAFiKjVvhtHpCfWZDfurHEQI/rE2mGCB9nMNJcvaSMjK/U0uyEMweqawIDAQAB
# rsa 加密私钥
rsa.privateKey = MIICdwIBADANBgkqhkiG9w0BAQEFAASCAmEwggJdAgEAAoGBAKjDC7x+0z788+Ubmw0WMW2I0bjOwwJFOZ9C4xcroHphX0WzWT1rrPqxRU6yq8LZ/dB5xo63ahs2zxR0/D8SV45xiT/xntqxVUlwBFxgeJDw2QFSY/JRAoAWIqNW+G0ekJ9ZkN+6scRAj+sTaYYIH2cw0ly9pIyMr9TS7IQzB6prAgMBAAECgYEAmGZi/9sMC5LE8b4HPD8xbbgjpB/bzP4UtjTh/LeiGUI7licLTMMjF9TkQNhq8fCIHC8MVy9dO6w4P0IR1SdMNtfx674b3H6WjSpCXT9B4GVqzv6xiAh1r0wDoE7mJtLiAI5EkPxZm+IEim6D89mVn8/aUjkqkQ7ZLwAu2uvOHKkCQQDSm2rJP3o31pCpEGN2vJMg3Cy2R5woGUejmnnVM6ot8+up0L4z5Q9AmRaEXt1TGyateSt44/yGNEIsRiPYy90VAkEAzSLAwzU68awJmMwDznK44QMdIDGkIweLNJcRD5SO/ne4giQmYnDQTfB4Q48QIiYKp0RwJJRc7PTcxbVF7vJJfwJAWRo16KT5gUw+8bgkTKTlnl5ocEoFsBVZ8Ma3StNL6ZssFjFhdzUu6caa9y/ndXSkPXppQQE74k+Tu4WFPwCpLQJBALfFFXkLe8W7QFGxGwvcvIFfv7zym7+B55RybSdPCBcxe4qjBfwUYpggAC1Nwb9F4y9b4Tbz7pec+RbpQUBBr9MCQEGl3q9ZX/Qh7YFt9bVVHew/WAzJLapCdcrV3mgQQQFHaTvdEGtwYh4t/VwGVFNRHqCN5yS4LlD9YS5sGOf1U3s=
# requestBody json 参数
rsa.requestInput = inputData
# requestBody json 参数
rsa.responseOutput = outputData