Commit cb60dbcc authored by 赵啸非's avatar 赵啸非

测试流控功能

parent a874b032
......@@ -244,11 +244,13 @@
<!-- Spring Boot Data Elasticsearch依赖 -->
<!--
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-elasticsearch</artifactId>
<version>2.7.18</version>
</dependency>
-->
</dependencies>
......
......@@ -80,7 +80,17 @@ public class MessageServiceImpl implements MessageService {
messageReq.setKey(req.getPassword());
messageReq.setDecryptContent(decryptContent);
return messageReq;
} else if ("SM4".equalsIgnoreCase(req.getAlgorithm())) {
}else if ("SM4".equalsIgnoreCase(req.getAlgorithm())) {
String decryptContent = null;
try {
decryptContent = encryptSM4(req.getPassword(), req.getContent());
} catch (Exception e) {
throw new AppException("加密异常" + e.getMessage());
}
messageReq.setKey(req.getKey());
messageReq.setDecryptContent(decryptContent);
return messageReq;
}else if ("SM4new".equalsIgnoreCase(req.getAlgorithm())) {
//加密数据 并请求 再解密数据
JSONObject jsonObject = JSON.parseObject(req.getContent());
JSONObject bizJson = jsonObject.getJSONObject("biz_content");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment