|
@@ -2,6 +2,7 @@ package com.ruoyi.common.security.utils;
|
|
|
|
|
|
import com.ruoyi.common.core.exception.ServiceException;
|
|
|
import com.ruoyi.common.core.utils.StringUtils;
|
|
|
+import com.ruoyi.common.core.utils.sign.Base64;
|
|
|
import com.ruoyi.system.validate.EncryptionV;
|
|
|
import io.swagger.annotations.ApiModelProperty;
|
|
|
import org.apache.commons.lang3.ObjectUtils;
|
|
@@ -46,7 +47,9 @@ public class EncryptionUtils {
|
|
|
}
|
|
|
String beforeSetEnKey = null;
|
|
|
try {
|
|
|
- beforeSetEnKey = SecurityUtils.sm4decrypt_ECB(key, beforeSet);
|
|
|
+ if(StringUtils.isNotNull(Base64.decode(beforeSet))){
|
|
|
+ beforeSetEnKey = SecurityUtils.sm4decrypt_ECB(key, beforeSet);
|
|
|
+ }
|
|
|
} catch(Exception e) {
|
|
|
//
|
|
|
}
|