Interface UnixDESCryptPassword

    • Method Detail

      • getSalt

        short getSalt()
        Get the salt of this password as a short.
        the salt
      • getHash

        byte[] getHash()
        Get the crypt bytes, not including the salt.
        the crypt bytes
      • 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
        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
        parameterSpec - the parameter specification (must not be null)
        true if the password is matched by the parameters, false otherwise
      • createRaw

        static UnixDESCryptPassword createRaw​(String algorithm,
                                              short 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.
        algorithm - the algorithm name
        salt - the salt
        hash - the hash
        the raw password implementation