Map<String,Object> encryParam = new HashMap<>(5)
encryParam.put("connectorUrl",connectorUrl)
encryParam.put("token",token)
encryParam.put("plugin",pluginsList)
encryParam.put("ipAddress",connectorConfig.getIpAddress().split("//")[1])
encryParam.put("port",connectorConfig.getConnectorPort())
String encryParamJson = JSON.toJSONString(encryParam)
String base64 = Base64Utils.encode(encryParamJson.getBytes())
byte[] encryDataByte =
RSAUtils.encryptByPublicKey(Base64Utils.decode(base64), publicKey)
String encryData = Base64Utils.encode(encryDataByte)
System.out.println("加密后的字符串:" + encryData)
Map<String,Object> responseParam = new HashMap<>(5)
responseParam.put("encryData",encryData)
responseParam.put("data",encryParamJson)
responseParam.put("timeStamp",new DateTime().toString("yyyy-MM-dd HH:mm:ss"))