异常处理器升级到 0.0.4-SNAPSHOT。
This commit is contained in:
@@ -4,6 +4,7 @@ import javax.annotation.Nonnull;
|
||||
|
||||
import cn.hutool.core.util.RandomUtil;
|
||||
import cn.hutool.crypto.digest.DigestUtil;
|
||||
import xyz.zhouxy.plusone.constant.ErrorCodeConsts;
|
||||
import xyz.zhouxy.plusone.exception.PlusoneException;
|
||||
|
||||
/**
|
||||
@@ -30,7 +31,7 @@ public final class PasswordUtil {
|
||||
+ salt.substring(1);
|
||||
String sha512Hex = DigestUtil.sha512Hex(passwordWithSalt);
|
||||
if (sha512Hex == null) {
|
||||
throw new PlusoneException(9999999, "未知错误:哈希加密失败!");
|
||||
throw new PlusoneException(ErrorCodeConsts.DEFAULT_ERROR_CODE, "未知错误:哈希加密失败!");
|
||||
}
|
||||
return sha512Hex;
|
||||
}
|
||||
|
Reference in New Issue
Block a user