Schnittstelle PasswordHasher<T>

Typparameter:
T - The representation of the password, e.g. String, byte array, bigint…
Alle bekannten Implementierungsklassen:
UuidHasher

public interface PasswordHasher<T>
A haser for passwords
  • Methodenübersicht

    Modifizierer und Typ
    Methode
    Beschreibung
    hash(String password, String salt)
    hashes a password using a second input as salt
    default boolean
    matches(String plaintextPassword, String hashedPassword)
    test, whether a given plain text password matches a hashed password
    salt(String hashedPassword)
    return the salt part of a given hashed password
  • Methodendetails

    • hash

      String hash(String password, String salt)
      hashes a password using a second input as salt
      Parameter:
      password - the password to process
      salt - the salt added to the password
      Gibt zurück:
      the hased password
    • salt

      String salt(String hashedPassword)
      return the salt part of a given hashed password
      Parameter:
      hashedPassword - the hashed password to tokenize
      Gibt zurück:
      the salt extracted from the password
    • matches

      default boolean matches(String plaintextPassword, String hashedPassword)
      test, whether a given plain text password matches a hashed password
      Parameter:
      plaintextPassword - the plain text password to verify
      hashedPassword - the password hash to verigy against
      Gibt zurück:
      true, only if the plain text password corresponds with the hashed password