提交 08b1f7ce 编写于 作者: Chongwen.jiang's avatar Chongwen.jiang

加密方法给测试用,,

上级 7a250034
流水线 #22638 已失败 于阶段
in 0 second
...@@ -62,14 +62,14 @@ public class AutoCodeController extends AccountBaseController { ...@@ -62,14 +62,14 @@ public class AutoCodeController extends AccountBaseController {
} }
@PostMapping("/encryptedParams") @PostMapping("/encryptedParams")
public PicaResponse getEncryptedParams(@RequestBody BaseRequest request) throws Exception { public String getEncryptedParams(@RequestBody BaseRequest request) throws Exception {
String publicKey = "1234567890123456"; String publicKey = "1234567890123456";
String content = AESUtil.aesEncrypt(JSON.toJSONString(request), publicKey); String content = AESUtil.aesEncrypt(JSON.toJSONString(request), publicKey);
String encryptKey = RSAUtil.encrypt(publicKey); String encryptKey = RSAUtil.encrypt(publicKey);
Map<String, Object> map = new HashMap<>(2); Map<String, Object> map = new HashMap<>(2);
map.put("key", encryptKey); map.put("key", encryptKey);
map.put("content", content); map.put("content", content);
return PicaResponse.toResponse(map); return JSON.toJSONString(map);
} }
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册