Interface PasswordHasher

All Known Subinterfaces:
ExtendedPasswordHasher
All Known Implementing Classes:
BlowfishPasswordHasher, CombinedPasswordHasher, DummyPasswordHasher, Md5PasswordHasher, PhpPasswordHasher, Sha256PasswordHasher, Sha512PasswordHasher

public interface PasswordHasher
An interface that is able to hash passwords and check existing hashes against a password.
Since:
1.2.9
Author:
ralph
  • Method Summary

    Modifier and Type
    Method
    Description
    getPasswordHash(String plainPassword)
    Returns a hash of the given plain password.
    boolean
    testPassword(String plainPassword, String passwordHash)
    Tests a plain Password whether it is the same as a previously hashed password.
  • Method Details

    • getPasswordHash

      String getPasswordHash(String plainPassword)
      Returns a hash of the given plain password.
      Parameters:
      plainPassword - the password to be hashed
      Returns:
      the hash of the password
    • testPassword

      boolean testPassword(String plainPassword, String passwordHash)
      Tests a plain Password whether it is the same as a previously hashed password.
      Parameters:
      plainPassword - the plain password to be checked
      passwordHash - the hash of another password
      Returns:
      true when both passwords match each other