REM:
1. 修正一处打印消息
This commit is contained in:
HuangXin 2020-09-13 08:21:49 +08:00
parent 73a9bcbe43
commit 641b694541
1 changed files with 4 additions and 4 deletions

View File

@ -73,14 +73,14 @@ public class ProtocolSecurityServiceImpl implements ProtocolSecurityService {
try { try {
decryptContent = CryptoHelper.aes128Decryption(base64Decode, SecurityConfigValue.AES_KEY); decryptContent = CryptoHelper.aes128Decryption(base64Decode, SecurityConfigValue.AES_KEY);
} catch (Exception e) { } catch (Exception e) {
log.error("AES256 decode message error: {}", base64Decode); log.error("AES128 decode message error: {}", base64Decode);
throw new SecurityProtocolException(ErrorCode.ERR_DECRYPT_AES256); throw new SecurityProtocolException(ErrorCode.ERR_DECRYPT_AES256);
} }
} else if (proReq.getCryptoType() == ProtoCryptoType.CRYPTO_DES.getCode()) { } else if (proReq.getCryptoType() == ProtoCryptoType.CRYPTO_DES.getCode()) {
try { try {
decryptContent = CryptoHelper.desDecryption(base64Decode, SecurityConfigValue.DES_KEY); decryptContent = CryptoHelper.desDecryption(base64Decode, SecurityConfigValue.DES_KEY);
} catch (Exception e) { } catch (Exception e) {
log.error("DES256 decode message error: {}", base64Decode); log.error("DES decode message error: {}", base64Decode);
throw new SecurityProtocolException(ErrorCode.ERR_DECRYPT_3DES); throw new SecurityProtocolException(ErrorCode.ERR_DECRYPT_3DES);
} }
} else { } else {
@ -127,7 +127,7 @@ public class ProtocolSecurityServiceImpl implements ProtocolSecurityService {
SecurityConfigValue.AES_KEY); SecurityConfigValue.AES_KEY);
cipherText = CryptoHelper.base64Encryption(encode); cipherText = CryptoHelper.base64Encryption(encode);
} catch (Exception e) { } catch (Exception e) {
log.error("AES256 encode message error: {}", plainText); log.error("AES128 encode message error: {}", plainText);
throw new SecurityProtocolException(ErrorCode.ERR_DECRYPT_AES256); throw new SecurityProtocolException(ErrorCode.ERR_DECRYPT_AES256);
} }
} else if (cryptoType == ProtoCryptoType.CRYPTO_DES.getCode()) { } else if (cryptoType == ProtoCryptoType.CRYPTO_DES.getCode()) {
@ -136,7 +136,7 @@ public class ProtocolSecurityServiceImpl implements ProtocolSecurityService {
SecurityConfigValue.DES_KEY); SecurityConfigValue.DES_KEY);
cipherText= CryptoHelper.base64Encryption(encode); cipherText= CryptoHelper.base64Encryption(encode);
} catch (Exception e) { } catch (Exception e) {
log.error("DES256 encode message error: {}", plainText); log.error("DES encode message error: {}", plainText);
throw new SecurityProtocolException(ErrorCode.ERR_DECRYPT_3DES); throw new SecurityProtocolException(ErrorCode.ERR_DECRYPT_3DES);
} }
} else { } else {