官网 http://www.mindrot.org/projects/jBCrypt/
<dependency>
<groupId>org.mindrot</groupId>
<artifactId>jbcrypt</artifactId>
<version>0.4</version>
</dependency>
String password="123asdzxc";
String hashed = BCrypt.hashpw(password, BCrypt.gensalt(12));
System.out.println(hashed);
if (BCrypt.checkpw(password, hashed)) {
System.out.println("It matches");
} else {
System.out.println("It does not match");
}