Interface ScramDigestPassword

    • Field Detail

      • DEFAULT_SALT_SIZE

        static final int DEFAULT_SALT_SIZE
        The default salt size for this password type.
        See Also:
        Constant Field Values
      • DEFAULT_ITERATION_COUNT

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

      • getDigest

        byte[] getDigest()
        Get the digest represented by this password.
        Returns:
        the digest represented by this password
      • getSalt

        byte[] getSalt()
        Get the salt used to generate the digest.
        Returns:
        the salt used to generate the digest
      • getIterationCount

        int getIterationCount()
        Get the iteration count used to generate the digest.
        Returns:
        the iteration count used to generate the digest
      • 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
        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
      • createRaw

        static ScramDigestPassword createRaw​(String algorithm,
                                             byte[] digest,
                                             byte[] 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.
        Parameters:
        algorithm - the algorithm name
        digest - the digest
        salt - the salt
        iterationCount - the iteration count
        Returns:
        the raw password implementation