Package java.security

Class AlgorithmParametersSpi

    • Constructor Detail

      • AlgorithmParametersSpi

        public AlgorithmParametersSpi()
    • Method Detail

      • engineInit

        protected abstract void engineInit​(AlgorithmParameterSpec paramSpec)
                                    throws InvalidParameterSpecException
        Initializes this AlgorithmParametersSpi with the specified AlgorithmParameterSpec.
        Parameters:
        paramSpec - the parameter specification.
        Throws:
        InvalidParameterSpecException - if this AlgorithmParametersSpi has already been initialized or the given paramSpec is not appropriate for initializing this AlgorithmParametersSpi.
      • engineInit

        protected abstract void engineInit​(byte[] params)
                                    throws IOException
        Initializes this AlgorithmParametersSpi with the specified byte[] using the default decoding format for parameters. The default encoding format is ASN.1.
        Parameters:
        params - the encoded parameters.
        Throws:
        IOException - if this AlgorithmParametersSpi has already been initialized, or the parameter could not be encoded.
      • engineInit

        protected abstract void engineInit​(byte[] params,
                                           String format)
                                    throws IOException
        Initializes this AlgorithmParametersSpi with the specified byte[] using the specified decoding format.
        Parameters:
        params - the encoded parameters.
        format - the name of the decoding format.
        Throws:
        IOException - if this AlgorithmParametersSpi has already been initialized, or the parameter could not be encoded.
      • engineGetParameterSpec

        protected abstract <T extends AlgorithmParameterSpec> T engineGetParameterSpec​(Class<T> paramSpec)
                                                                                throws InvalidParameterSpecException
        Returns the AlgorithmParameterSpec for this AlgorithmParametersSpi.
        Parameters:
        paramSpec - the type of the parameter specification in which this parameters should be converted.
        Returns:
        the AlgorithmParameterSpec for this AlgorithmParametersSpi.
        Throws:
        InvalidParameterSpecException - if this AlgorithmParametersSpi has already been initialized, or if this parameters could not be converted to the specified class.
      • engineGetEncoded

        protected abstract byte[] engineGetEncoded()
                                            throws IOException
        Returns the parameters in their default encoding format. The default encoding format is ASN.1.
        Returns:
        the encoded parameters.
        Throws:
        IOException - if this AlgorithmParametersSpi has already been initialized, or if this parameters could not be encoded.
      • engineGetEncoded

        protected abstract byte[] engineGetEncoded​(String format)
                                            throws IOException
        Returns the parameters in the specified encoding format.
        Parameters:
        format - the name of the encoding format.
        Returns:
        the encoded parameters.
        Throws:
        IOException - if this AlgorithmParametersSpi has already been initialized, or if this parameters could not be encoded.
      • engineToString

        protected abstract String engineToString()
        Returns a string containing a concise, human-readable description of this AlgorithmParametersSpi.
        Returns:
        a printable representation for this AlgorithmParametersSpi.