Class SecretKeyCredential

    • Field Detail

      • secretKey

        private final SecretKey secretKey
    • Constructor Detail

      • SecretKeyCredential

        public SecretKeyCredential​(SecretKey secretKey)
        Construct a new instance.
        Parameters:
        secretKey - the secret key (may not be null)
    • Method Detail

      • getSecretKey

        public SecretKey getSecretKey()
        Get the secret key.
        Returns:
        the secret key (not null)
      • supportsParameters

        public boolean supportsParameters​(Class<? extends AlgorithmParameterSpec> paramSpecClass)
        Description copied from interface: AlgorithmCredential
        Determine whether this credential instance supports the given algorithm parameter type.
        Specified by:
        supportsParameters in interface AlgorithmCredential
        Parameters:
        paramSpecClass - the parameter specification class (must not be null)
        Returns:
        true if the parameter type is supported, false otherwise
      • getParameters

        public <P extends AlgorithmParameterSpec> P getParameters​(Class<P> paramSpecClass)
        Description copied from interface: AlgorithmCredential
        Get the algorithm parameters of the given type from this credential.
        Specified by:
        getParameters in interface AlgorithmCredential
        Parameters:
        paramSpecClass - the parameter specification class (must not be null)
        Returns:
        the parameter specification, or null if no parameters are present or available or the given type was not supported by this credential
      • impliesSameParameters

        public boolean impliesSameParameters​(AlgorithmCredential other)
        Description copied from interface: AlgorithmCredential
        Determine whether the other credential's parameters are implied by this one.
        Specified by:
        impliesSameParameters in interface AlgorithmCredential
        Parameters:
        other - the other credential (must not be null)
        Returns:
        true if the credentials have matching parameters, false otherwise
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object