edu.ucsb.nceas.metacat.authentication

## 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

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.lang.String` | `hash(java.lang.String plain)` Generate the hash value for a specified plaint password
    `boolean` | `match(java.lang.String plain, java.lang.String hashed)` Check if the plain password matches the hashed password.

- - ### Method Detail

    - #### match

          boolean match(java.lang.String plain,
                        java.lang.String hashed)
                 throws java.lang.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:
        `java.lang.Exception`

    - #### hash

          java.lang.String hash(java.lang.String plain)

      Generate the hash value for a specified plaint password
      Parameters:
        `plain` - the plain password
      Returns:
        the hash value of the password

Copyright © 2023 Regents of the University of California. All Rights Reserved.