Class PasswordKeyMapper

    • Field Detail

      • hashColumn

        private final int hashColumn
      • saltColumn

        private final int saltColumn
      • iterationCountColumn

        private final int iterationCountColumn
      • defaultIterationCount

        private final int defaultIterationCount
      • algorithmColumn

        private final int algorithmColumn
      • defaultAlgorithm

        private final String defaultAlgorithm
      • hashEncoding

        private final Encoding hashEncoding
      • saltEncoding

        private final Encoding saltEncoding
    • Method Detail

      • getCredentialAcquireSupport

        public SupportLevel getCredentialAcquireSupport​(Class<? extends Credential> credentialType,
                                                        String algorithmName,
                                                        AlgorithmParameterSpec parameterSpec)
        Description copied from interface: KeyMapper
        Determine whether a credential of the given type and algorithm is definitely obtainable, possibly obtainable (for] some identities), or definitely not obtainable.
        Specified by:
        getCredentialAcquireSupport in interface KeyMapper
        Parameters:
        credentialType - the exact credential type (must not be null)
        algorithmName - the algorithm name, or null if any algorithm is acceptable or the credential type does not support algorithm names
        parameterSpec - the algorithm parameters to match, or null if any parameters are acceptable or the credential type does not support algorithm parameters
        Returns:
        the level of support for this credential
      • getEvidenceVerifySupport

        public SupportLevel getEvidenceVerifySupport​(Class<? extends Evidence> evidenceType,
                                                     String algorithmName)
        Description copied from interface: KeyMapper
        Determine whether a given type of evidence is definitely verifiable, possibly verifiable (for some identities), or definitely not verifiable.
        Specified by:
        getEvidenceVerifySupport in interface KeyMapper
        Parameters:
        evidenceType - the type of evidence to be verified (must not be null)
        algorithmName - the algorithm name, or null if any algorithm is acceptable or the evidence type does not support algorithm names
        Returns:
        the level of support for this evidence type
      • getDefaultAlgorithm

        public String getDefaultAlgorithm()
        Returns the name of the algorithm being used.
        Returns:
        the algorithm
      • getHashColumn

        public int getHashColumn()
        Returns an integer representing the column index from where the password in its clear, hash or encoded form is obtained.
        Returns:
        the column index
      • getSaltColumn

        public int getSaltColumn()
        Returns an integer representing the column index from where the salt (if supported) is obtained.
        Returns:
        the column index
      • getIterationCountColumn

        public int getIterationCountColumn()
        Returns an integer representing the column index from where the iteration count (if supported) is obtained.
        Returns:
        the column index
      • getDefaultIterationCount

        public int getDefaultIterationCount()
        Get the default iteration count. This count is used if there is no iteration count column but the password algorithm uses an iteration count.
        Returns:
        the default iteration count
      • getAlgorithmColumn

        public int getAlgorithmColumn()
        Get the column index of the algorithm name column.
        Returns:
        the column index of the algorithm name column, or -1 if there is no algorithm column defined
      • decodeColumn

        private static byte[] decodeColumn​(String string,
                                           Encoding encoding)
      • builder

        public static PasswordKeyMapper.Builder builder()
        Construct a builder for password key mappers.
        Returns:
        the new builder (not null)