自然人获取企业列表
POST
https://api.qixiangyun.com/v2/public/zrr/queryOrglist
接口描述
JSONObject jsonObject=new JSONObject();
jsonObject.put("gryhmm",RSAClientUtil.encrypt("yyyyy222!!@@"));
MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC+vuYMGtTU+42wwbaFX+PkCuSeoREKe5V4EJMi553Gc03ficUdpLHIFdEjAMHAxepwm3RAGLwyxYFK/S93k8GYMuV35L2Nj/cVeHS8scsdqXzqLUKaI4wj438OI6HDh7rWsw1M5EgMsoZvQqja53+SgD3mgIy3XyILbmA5jUp2IwIDAQAB
public static String encrypt(String data) throws Exception {
byte[] bytes = Base64.decode(publicKey);//publicKey 公钥
X509EncodedKeySpec spec = new X509EncodedKeySpec(bytes);
KeyFactory factory = KeyFactory.getInstance("RSA");
PublicKey publicKey = factory.generatePublic(spec);
Cipher cipher = Cipher.getInstance("RSA");
cipher.init(Cipher.ENCRYPT_MODE, publicKey);
int inputLen = data.getBytes().length;
ByteArrayOutputStream out = new ByteArrayOutputStream();
int offset = 0;
byte[] cache;
int i = 0;
while (inputLen - offset > 0) {
if (inputLen - offset > 117) {
cache = cipher.doFinal(data.getBytes(), offset, 117);
} else {
cache = cipher.doFinal(data.getBytes(), offset, inputLen - offset);
}
out.write(cache, 0, cache.length);
i++;
offset = i * 117;
}
byte[] encryptedData = out.toByteArray();
out.close();
return Base64.encode(encryptedData);
}
请求参数
Header 参数
access_token
string
必需
示例值:
{{access_token}}
req_date
string
必需
示例值:
{{req_date}}
req_sign
string
必需
示例值:
{{req_sign}}
Content-Type
string
可选
默认值:
application/json
Body 参数application/json
返回响应
修改于 2024-07-12 02:13:47