|
|
@@ -29,10 +29,10 @@ public class RSAUtils {
|
|
|
public static void main(String[] args) {
|
|
|
|
|
|
|
|
|
- String data ="{\"erp\":\"12818\",\"dealerId\":6906,\"name\":\"芜湖福瑞汽车销售有限公司\",\"roleType\":\"商城经销商\"}";
|
|
|
-
|
|
|
+ String data ="{\"code\":200,\"msg\":\"登录成功\",\"data\":{\"erp\":\"12818\",\"dealerId\":6906,\"name\":\"芜湖福瑞汽车销售有限公司\",\"roleType\":\"商城经销商\"}}";
|
|
|
String encrypt = RSAUtils.encrypt(RSAUtils.publicKey, data);
|
|
|
- System.out.println(encrypt);
|
|
|
+ //防止URL 传参 + 号丢失
|
|
|
+ System.out.println(encrypt.replace("+","%2B"));
|
|
|
String responseString = RSAUtils.decrypt(privateKey, encrypt);
|
|
|
|
|
|
System.out.println(responseString);
|