Interface UnixMD5CryptPassword

All Superinterfaces:
Cloneable, Key, OneWayPassword, Password, Serializable

public interface UnixMD5CryptPassword extends OneWayPassword
The UNIX modular-crypt MD5 crypt algorithm.
Author:
David M. Lloyd
  • Field Details

  • Method Details

    • getSalt

      byte[] getSalt()
      Get the salt component of this password.
      Returns:
      the salt component
    • getHash

      byte[] getHash()
      Get the hash component of this password.
      Returns:
      the hash component
    • getParameterSpec

      default SaltedPasswordAlgorithmSpec getParameterSpec()
      Description copied from interface: Password
      Get the applicable algorithm parameter specification for this password type.
      Specified by:
      getParameterSpec in interface Password
      Returns:
      the algorithm parameter specification, or null if this password type does not support algorithms
    • impliesParameters

      default boolean impliesParameters(AlgorithmParameterSpec parameterSpec)
      Description copied from interface: Password
      Determine if this password is matched by the given parameter specification.
      Specified by:
      impliesParameters in interface Password
      Parameters:
      parameterSpec - the parameter specification (must not be null)
      Returns:
      true if the password is matched by the parameters, false otherwise
    • clone

      Creates and returns a copy of this Password.
      Specified by:
      clone in interface OneWayPassword
      Specified by:
      clone in interface Password
      Returns:
      a copy of this Password.
    • createRaw

      static UnixMD5CryptPassword createRaw(String algorithm, byte[] salt, byte[] hash)
      Create a raw implementation of this password type. No validation of the content is performed, and the password must be "adopted" in to a PasswordFactory (via the PasswordFactory.translate(Password) method) before it can be validated and used to verify guesses.
      Parameters:
      algorithm - the algorithm name
      salt - the salt
      hash - the hash
      Returns:
      the raw password implementation