Commit 65cbcf71 authored by 黎博's avatar 黎博

debug

parent 38974a91
......@@ -30,7 +30,7 @@ public class YeebaoEncryptConvertor implements EncryptConvertor{
try {
Map responseMap = JSON.parseObject(response, Map.class);
Map<String, Object> signData = new HashMap<>();
responseMap.put("sign", Rsa.sign(response, YeebaoPrivateKey));
responseMap.put("sign", Rsa.sign(response, this.YeebaoPrivateKey));
signData.put("encryptkey", encryptKey);
signData.put("data", Aes.encryptToBase64(JSON.toJSONString(responseMap), aesKey));
return JSON.toJSONString(signData);
......@@ -48,10 +48,10 @@ public class YeebaoEncryptConvertor implements EncryptConvertor{
@Override
public String decrypt(String request) {
try {
log.info("易宝privateKey======= ", YeebaoPrivateKey);
log.info("易宝privateKey======= ", this.YeebaoPrivateKey);
Map requestMap = JSON.parseObject(request, Map.class);
encryptKey = requestMap.get("encryptkey").toString();
aesKey = Rsa.decrypt(encryptKey, YeebaoPrivateKey);
aesKey = Rsa.decrypt(encryptKey, this.YeebaoPrivateKey);
return Aes.decryptFromBase64((String) requestMap.get("data"), aesKey);
} catch (Exception e) {
e.printStackTrace();
......
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