diff --git a/jero-boot-base/jero-boot-base-core/src/main/java/com/jero/common/util/PasswordUtil.java b/jero-boot-base/jero-boot-base-core/src/main/java/com/jero/common/util/PasswordUtil.java index 8ec5982f..a7a671f4 100644 --- a/jero-boot-base/jero-boot-base-core/src/main/java/com/jero/common/util/PasswordUtil.java +++ b/jero-boot-base/jero-boot-base-core/src/main/java/com/jero/common/util/PasswordUtil.java @@ -1,5 +1,7 @@ package com.jero.common.util; +import org.apache.commons.lang3.StringUtils; + import java.security.Key; import java.security.SecureRandom; import javax.crypto.Cipher; @@ -153,8 +155,12 @@ public class PasswordUtil { * @throws Exception */ public static String decrypt(String ciphertext) { + if (StringUtils.isNotBlank(ciphertext)){ + return decrypt(ciphertext, ALGORITHM, Salt); + }else { + return ""; + } - return decrypt(ciphertext, ALGORITHM, Salt); } /**