Selaa lähdekoodia

重庆热线-部级调用省级密码修改调整,测试时需要按照此密码encrypt_key_bjiami

dev
Cruyse 3 päivää sitten
vanhempi
commit
08b13b70c1
2 muutettua tiedostoa jossa 8 lisäystä ja 8 poistoa
  1. +4
    -4
      ruoyi-auth/src/main/java/cc/mrbird/febs/auth/configure/DecryptThirdTokenFilter.java
  2. +4
    -4
      ruoyi-auth/src/main/java/cc/mrbird/febs/auth/configure/TransportClient.java

+ 4
- 4
ruoyi-auth/src/main/java/cc/mrbird/febs/auth/configure/DecryptThirdTokenFilter.java Näytä tiedosto

@ -56,8 +56,8 @@ public class DecryptThirdTokenFilter extends OncePerRequestFilter {
private final Gson gson = new Gson();
// 新增加密服务实例在类顶部
private final SMCryptoService smCryptoService = new SMCryptoServiceImpl();
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 static final BytesKeyGenerator DEFAULT_TOKEN_GENERATOR = KeyGenerators.secureRandom(20);
private static final Charset US_ASCII = Charset.forName("US-ASCII");
@Autowired
@ -252,7 +252,7 @@ public class DecryptThirdTokenFilter extends OncePerRequestFilter {
// SM4加密BodyECB模式
public String encryptBody(String plainText) throws Exception {
EncryptCodeBean encryptCodeBean = new EncryptCodeBean();
encryptCodeBean.setSecretKey(encrypt_key);
encryptCodeBean.setSecretKey(encrypt_key_bjiami);
encryptCodeBean.setPass(plainText);
String cipherText = smCryptoService.encrypt_Body(encryptCodeBean);
return cipherText;
@ -260,7 +260,7 @@ public class DecryptThirdTokenFilter extends OncePerRequestFilter {
// SM4解密BodyECB模式
public String decryptBody(String plainText) throws Exception {
DecryptCodeBean encrypt2 = new DecryptCodeBean();
encrypt2.setSecretKey(encrypt_key);
encrypt2.setSecretKey(encrypt_key_bjiami);
encrypt2.setPass(plainText);
String cipherText = smCryptoService.decrypt_Body(encrypt2);
return cipherText;

+ 4
- 4
ruoyi-auth/src/main/java/cc/mrbird/febs/auth/configure/TransportClient.java Näytä tiedosto

@ -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加密BodyECB模式
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解密BodyECB模式
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;

Ladataan…
Peruuta
Tallenna