style: 更新用户平台模块数据库数据
This commit is contained in:
16
wfc-auth/src/test/java/TestBCrypt.java
Normal file
16
wfc-auth/src/test/java/TestBCrypt.java
Normal file
@@ -0,0 +1,16 @@
|
||||
import org.wfc.common.security.utils.SecurityUtils;
|
||||
|
||||
public class TestBCrypt {
|
||||
public static void main(String[] args) {
|
||||
// 测试密码加密
|
||||
String password = "123456";
|
||||
String encryptedPassword = SecurityUtils.encryptPassword(password);
|
||||
System.out.println(password + " 加密=> " + encryptedPassword);
|
||||
|
||||
// 验证原密码和加密密码是否匹配
|
||||
boolean match = SecurityUtils.matchesPassword(password, encryptedPassword);
|
||||
if (match) {
|
||||
System.out.println("匹配原密码");
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user