public abstract class

AlgorithmParametersSpi

extends Object
java.lang.Object
   ↳ java.security.AlgorithmParametersSpi

Class Overview

AlgorithmParametersSpi is the Service Provider Interface (SPI) definition for AlgorithmParameters.

Summary

Public Constructors
AlgorithmParametersSpi()
Protected Methods
abstract byte[] engineGetEncoded(String format)
Returns the parameters in the specified encoding format.
abstract byte[] engineGetEncoded()
Returns the parameters in their default encoding format.
abstract <T extends AlgorithmParameterSpec> T engineGetParameterSpec(Class<T> paramSpec)
Returns the AlgorithmParameterSpec for this AlgorithmParametersSpi.
abstract void engineInit(byte[] params, String format)
Initializes this AlgorithmParametersSpi with the specified byte[] using the specified decoding format.
abstract void engineInit(byte[] params)
Initializes this AlgorithmParametersSpi with the specified byte[] using the default decoding format for parameters.
abstract void engineInit(AlgorithmParameterSpec paramSpec)
Initializes this AlgorithmParametersSpi with the specified AlgorithmParameterSpec.
abstract String engineToString()
Returns a string containing a concise, human-readable description of this AlgorithmParametersSpi.
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public AlgorithmParametersSpi ()

Since: API Level 1

Protected Methods

protected abstract byte[] engineGetEncoded (String format)

Since: API Level 1

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.

protected abstract byte[] engineGetEncoded ()

Since: API Level 1

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.

protected abstract T engineGetParameterSpec (Class<T> paramSpec)

Since: API Level 1

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.

protected abstract void engineInit (byte[] params, String format)

Since: API Level 1

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.

protected abstract void engineInit (byte[] params)

Since: API Level 1

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.

protected abstract void engineInit (AlgorithmParameterSpec paramSpec)

Since: API Level 1

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.

protected abstract String engineToString ()

Since: API Level 1

Returns a string containing a concise, human-readable description of this AlgorithmParametersSpi.

Returns
  • a printable representation for this AlgorithmParametersSpi.