|
|
@ -32,8 +32,8 @@ public class TransportClient { |
|
|
|
private static final String BASE_AREA_CODE = "999999"; // 基础系统标识 |
|
|
|
private static final DateTimeFormatter DATE_FORMATTER = |
|
|
|
DateTimeFormatter.ofPattern("yyyyMMddHHmmss"); |
|
|
|
private static final String encrypt_key = "8iot1blDJgNK36Do"; // 行政区划代码 |
|
|
|
private static final String decrypt_key = "QLdQIASYMlT9SUUg"; |
|
|
|
private static final String encrypt_key_bjiemi = "8iot1blDJgNK36Do"; //部解密省加密 |
|
|
|
private static final String encrypt_key_bjiami = "QLdQIASYMlT9SUUg";//部加密省解密 |
|
|
|
private final OkHttpClient httpClient = new OkHttpClient(); |
|
|
|
private final Gson gson = new Gson(); |
|
|
|
private final AtomicLong sequence = new AtomicLong(1); |
|
|
@ -112,7 +112,7 @@ public class TransportClient { |
|
|
|
// SM4加密Body(ECB模式) |
|
|
|
public String encryptBody(String plainText) throws Exception { |
|
|
|
EncryptCodeBean encryptCodeBean = new EncryptCodeBean(); |
|
|
|
encryptCodeBean.setSecretKey(encrypt_key); |
|
|
|
encryptCodeBean.setSecretKey(encrypt_key_bjiemi); |
|
|
|
encryptCodeBean.setPass(plainText); |
|
|
|
String cipherText = smCryptoService.encrypt_Body(encryptCodeBean); |
|
|
|
return cipherText; |
|
|
@ -121,7 +121,7 @@ public class TransportClient { |
|
|
|
// SM4解密Body(ECB模式) |
|
|
|
public String decryptBody(String plainText) throws Exception { |
|
|
|
DecryptCodeBean encrypt2 = new DecryptCodeBean(); |
|
|
|
encrypt2.setSecretKey(decrypt_key); |
|
|
|
encrypt2.setSecretKey(encrypt_key_bjiemi); |
|
|
|
encrypt2.setPass(plainText); |
|
|
|
String cipherText = smCryptoService.decrypt_Body(encrypt2); |
|
|
|
return cipherText; |
|
|
|