修复解密空指针异常问题

v1.4.1
Parker 5 years ago
parent 901e96e0b5
commit 835f299ff6

@ -161,9 +161,9 @@ public enum EncryptAndDecryptByRsaUtil {
*/ */
public String decryptedData(RSA rsa,String data){ public String decryptedData(RSA rsa,String data){
//解密,因为编码传值时有空格出现 //解密,因为编码传值时有空格出现
data = data.replaceAll(" ", "+");
String decryptStr; String decryptStr;
try{ try{
data = data.replaceAll(" ", "+");
String tmp = rsa.decryptStr(data, KeyType.PrivateKey); String tmp = rsa.decryptStr(data, KeyType.PrivateKey);
JSONObject jsonObject = JSONObject.parseObject(tmp); JSONObject jsonObject = JSONObject.parseObject(tmp);
Object obj = jsonObject.get(rsaKey); Object obj = jsonObject.get(rsaKey);

Loading…
Cancel
Save