Interface PushCredentials.PasswordHashing

Enclosing class:
PushCredentials

public static interface PushCredentials.PasswordHashing
How an IZ1 password is hashed and checked: the server's own PasswordHasher in production, supplied so that a test needs no server.
Author:
Christopher Mindus
  • Method Summary

    Modifier and Type
    Method
    Description
    hash(String userID, String clearText)
    Hashes a clear-text password for a user ID, IZ1:iterations:salt:hash.
    boolean
    matches(String userID, String clearText, String hash)
    Checks a clear-text password against a hash.
  • Method Details

    • hash

      String hash(String userID, String clearText)
      Hashes a clear-text password for a user ID, IZ1:iterations:salt:hash.
      Parameters:
      userID - The user ID, part of the salt.
      clearText - The password.
      Returns:
      The hash.
    • matches

      boolean matches(String userID, String clearText, String hash)
      Checks a clear-text password against a hash.
      Parameters:
      userID - The user ID the hash was made for.
      clearText - The password presented.
      hash - The stored hash.
      Returns:
      true when they match.