@Test public void testHash() { UpdatableBCrypt bcrypt = new UpdatableBCrypt(11); String hash = bcrypt.hash("password"); assertTrue(bcrypt.verifyHash("password", hash)); }
public String hash(String password) { return BCrypt.hashpw(password, BCrypt.gensalt(logRounds)); }
UpdatableBCrypt { public String hash(String password) { return BCrypt.hashpw(password, BCrypt.gensalt(logRounds)); } }
UpdatableBCrypt { public String hash(String password) { return BCrypt.hashpw(password, BCrypt.gensalt(logRounds)); } UpdatableBCrypt(int logRounds); }
UpdatableBCrypt { public String hash(String password) { return BCrypt.hashpw(password, BCrypt.gensalt(logRounds)); } UpdatableBCrypt(int logRounds); String hash(String password); boolean verifyHash(String password, String hash); boolean verifyAndUpdateHash(String password, String hash, Function<String, Boolean> updateFunc); }
UpdatableBCrypt { public String hash(String password) { return BCrypt.hashpw(password, BCrypt.gensalt(logRounds)); } UpdatableBCrypt(int logRounds); String hash(String password); boolean verifyHash(String password, String hash); boolean verifyAndUpdateHash(String password, String hash, Function<String, Boolean> updateFunc);  }