@Test void hashPasswordShouldHashWhenSHA256() { Assertions.assertThat(JPAUser.hashPassword(RANDOM_PASSWORD, "SHA-256")).isEqualTo("6d06c72a578fe0b78ede2393b07739831a287774dcad0b18bc4bde8b0c948b82"); }
@VisibleForTesting static String hashPassword(String password, String alg) { return chooseHashFunction(alg).apply(password); }
JPAUser implements User { @VisibleForTesting static String hashPassword(String password, String alg) { return chooseHashFunction(alg).apply(password); } }
JPAUser implements User { @VisibleForTesting static String hashPassword(String password, String alg) { return chooseHashFunction(alg).apply(password); } protected  JPAUser();  JPAUser(String userName, String password, String alg); }
JPAUser implements User { @VisibleForTesting static String hashPassword(String password, String alg) { return chooseHashFunction(alg).apply(password); } protected  JPAUser();  JPAUser(String userName, String password, String alg); @Override Username getUserName(); @Override boolean setPassword(String newPass); @Override boolean verifyPassword(String pass); @Override int hashCode(); @Override boolean equals(Object obj); @Override String toString(); }
JPAUser implements User { @VisibleForTesting static String hashPassword(String password, String alg) { return chooseHashFunction(alg).apply(password); } protected  JPAUser();  JPAUser(String userName, String password, String alg); @Override Username getUserName(); @Override boolean setPassword(String newPass); @Override boolean verifyPassword(String pass); @Override int hashCode(); @Override boolean equals(Object obj); @Override String toString();  }