@Test void hashPasswordShouldHashWhenSHA512() { Assertions.assertThat(JPAUser.hashPassword(RANDOM_PASSWORD, "SHA-512")).isEqualTo("f9cc82d1c04bb2ce0494a51f7a21d07ac60b6f79a8a55397f454603acac29d8589fdfd694d5c01ba01a346c76b090abca9ad855b5b0c92c6062ad6d93cdc0d03"); }
@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();  }