1.导入依赖Bcrypt
2.
String str = "123";
String salt = BCrypt.gensalt();//盐
String password = BCrypt.hashpw(str,salt);//生成加密之后的密码
//校验
String str2 = "123";
Boolean result = BCrypt.checkpw(str2,password);
1.导入依赖Bcrypt
2.
String str = "123";
String salt = BCrypt.gensalt();//盐
String password = BCrypt.hashpw(str,salt);//生成加密之后的密码
//校验
String str2 = "123";
Boolean result = BCrypt.checkpw(str2,password);