| 字段名 | 是否必须 | 字段类型 | 最大长度 | 字段说明 |
|---|---|---|---|---|
| Authorization | 是 | String | 1024 | Bearer + 空格 + access_token值 |
| Request-ID | 是 | String | 32 | 唯一 |
| Tuotuo-Signature | 是 | String | 256 | 签名串 |
| Tuotuo-Timestamp | 是 | String | 16 | 单位:毫秒 |
| 字段名 | 是否必须 | 字段类型 | 最大长度 | 字段说明 |
|---|---|---|---|---|
| Request-ID | 是 | String | 32 | 唯一 |
| Tuotuo-Signature | 是 | String | 256 | 签名串 |
| Tuotuo-Timestamp | 是 | String | 16 | 单位:毫秒 |
HTTP/1.1 200
Server: TuoTuo/1.22.1
Date: Wed, 09 Aug 2023 06:04:15 GMT
Content-Type: application/json;charset=UTF-8
Request-ID: 2de71fd52602408a8afaf4ffe1142695
Tuotuo-Signature: WcQkjBLdmIYAoGsHneYBT1eH0jcq6s9MqhRq69Sl
Tuotuo-Timestamp: 1691134045524
{"code":200,"message":"请求成功","data":{"ciphertext":"rty789"}}| 字段名 | 是否必须 | 字段类型 | 最大长度 | 字段说明 |
|---|---|---|---|---|
| Request-ID | 是 | String | 32 | 请求id,唯一 |
| Tuotuo-Signature | 是 | String | 256 | 签名串 |
| Tuotuo-Timestamp | 是 | String | 16 | 时间戳,单位:毫秒 |
| 环境 | 域名 | 说明 |
|---|---|---|
| 开发地址 | https://open-test.inflyway.com | 对IP白名单无限制 |
| 生产地址 | https://open.inflyway.com | 对IP白名单限制 |
{
"requestNo":"1517635190864238633205408",
"bankCardNo": "10000000000006",
"openID":"61bff460b5a74a6b91868de432e33ace",
"bankAccountName": "mock company name.Ltd",
"supplementInformation": {
}
}{
"ciphertext" : "rty789qeuoanl23nj23"
}HTTP/1.1 200
Server: TuoTuo/1.22.1
Date: Wed, 09 Aug 2023 06:04:15 GMT
Content-Type: application/json;charset=UTF-8
Request-ID: 2de71fd52602408a8afaf4ffe1142695
Tuotuo-ClientId: C123456789
Tuotuo-Signature: WcQkjBLdmIYAoGsHneYBT1eH0jcq6s9MqhRq69Sl
Tuotuo-Timestamp: 1691134045524
{"ciphertext":"rty789"}{
"code":200,
"message":null
} /**
* 测试生成RSA公私钥对
*/
public static void testCreateKey() throws Exception {
// 使用默认密钥长度 1024
Map<String, String> keyMap = OpenRsaUtil.createKey(1024);
String publicKey = keyMap.get("publicKey");
String privateKey = keyMap.get("privateKey");
System.out.println("生成的公钥: " + publicKey);
System.out.println("生成的私钥: " + privateKey);
System.out.println("公钥长度: " + publicKey.length());
System.out.println("私钥长度: " + privateKey.length());
// 验证密钥不为空
assert !publicKey.isEmpty() : "公钥不应为空";
assert !privateKey.isEmpty() : "私钥不应为空";
}