Interface BSDUnixDESCryptPassword

    • Field Detail


        static final int BSD_CRYPT_DES_HASH_SIZE
        The constant size of the hash, in bytes.
        See Also:
        Constant Field Values

        static final int BSD_CRYPT_DES_SALT_SIZE
        The constant size of the salt, in bytes.
        See Also:
        Constant Field Values

        static final int DEFAULT_ITERATION_COUNT
        The default iteration count.
        See Also:
        Constant Field Values
    • Method Detail

      • getIterationCount

        int getIterationCount()
        Get the iteration count of this password.
        the iteration count
      • getSalt

        int getSalt()
        Get the salt segment of this password as an int value.
        the salt segment
      • getHash

        byte[] getHash()
        Get the hash segment of this password.
        the hash segment
      • getParameterSpec

        default IteratedSaltedPasswordAlgorithmSpec 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 BSDUnixDESCryptPassword createRaw​(String algorithm,
                                                 byte[] hash,
                                                 int salt,
                                                 int iterationCount)
        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
        hash - the hash
        salt - the salt
        iterationCount - the iteration count
        the raw password implementation