This commit is contained in:
parent
d2119b0cbc
commit
34e5ad299e
|
|
@ -7,6 +7,7 @@ import cn.hutool.crypto.Padding;
|
|||
import cn.hutool.crypto.SecureUtil;
|
||||
import cn.hutool.crypto.SmUtil;
|
||||
import cn.hutool.crypto.symmetric.SM4;
|
||||
import com.bonus.common.core.utils.encryption.Sm4Utils;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import cn.hutool.core.util.*;
|
||||
|
|
@ -61,6 +62,7 @@ public class SM4EncryptUtils {
|
|||
data = data.substring(0, data.length() - "##encrypted".length());
|
||||
return SmUtil.sm4(SecureUtil.decode(properties.getSm4Key())).decryptStr(data);
|
||||
} else {
|
||||
data = Sm4Utils.decrypt(data);
|
||||
return data;
|
||||
}
|
||||
} catch (Exception var2) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue