Interface AuthFileHashInterface

All Known Implementing Classes:
AuthFileBCryptHash

public interface AuthFileHashInterface
This an interface for different hash algorithms using to protect users' password in the username/password file
Author:
tao
  • Method Summary

    Modifier and Type
    Method
    Description
    hash(String plain)
    Generate the hash value for a specified plaint password
    boolean
    match(String plain, String hashed)
    Check if the plain password matches the hashed password.
  • Method Details

    • match

      boolean match(String plain, String hashed) throws Exception
      Check if the plain password matches the hashed password. Return true if they match; false otherwise.
      Parameters:
      plain - the plain password
      hashed - the hashed password
      Returns:
      true if they match
      Throws:
      Exception
    • hash

      String hash(String plain)
      Generate the hash value for a specified plaint password
      Parameters:
      plain - the plain password
      Returns:
      the hash value of the password