完成快速登录功能,以及自测。

This commit is contained in:
YunaiV
2020-07-03 20:42:35 +08:00
parent 3d6bd5e4ee
commit 3cbd872497
14 changed files with 53 additions and 19 deletions

View File

@@ -7,6 +7,10 @@ import cn.hutool.crypto.digest.BCrypt;
*/
public class DigestUtils {
public static String genBcryptSalt() {
return BCrypt.gensalt();
}
public static String bcrypt(String key, String salt) {
return BCrypt.hashpw(key, salt);
}

View File

@@ -85,7 +85,7 @@ public class ServiceExceptionUtil {
* @return 异常
*/
public static ServiceException exception(Integer code) {
return exception(code, messages.get(code));
return exception0(code, messages.get(code));
}
/**