Commit 87c8e042 authored by 黎博's avatar 黎博

update

parent af9cf44c
...@@ -40,10 +40,10 @@ public class XinchengEncryptConvertor implements EncryptConvertor { ...@@ -40,10 +40,10 @@ public class XinchengEncryptConvertor implements EncryptConvertor {
@Override @Override
public String decrypt(String request) { public String decrypt(String request) {
String decodeData; String decodeData;
Map<String, Object> requestMap = JSON.parseObject(request, Map.class); // Map<String, Object> requestMap = JSON.parseObject(request, Map.class);
String requestStr = JSON.toJSONString(requestMap.get("content")); // String requestStr = JSON.toJSONString(requestMap.get("content"));
try { try {
decodeData = new String(RSA.decryptByPublicKey(Base64.decodeBase64(requestStr.getBytes()), xinchengPublicKey), Charsets.UTF_8); decodeData = new String(RSA.decryptByPublicKey(Base64.decodeBase64(request.getBytes()), xinchengPublicKey), Charsets.UTF_8);
} catch (Exception e) { } catch (Exception e) {
log.error("decrypt, decrypt response is error ", e); log.error("decrypt, decrypt response is error ", e);
throw new RuntimeException("解密新橙响应结果失败!"); throw new RuntimeException("解密新橙响应结果失败!");
......
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