此項目下載地址: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