Package java.security
Class AlgorithmParametersSpi
java.lang.Object
java.security.AlgorithmParametersSpi
- Direct Known Subclasses:
AlgorithmParametersSpi,AlgorithmParametersSpi,AlgorithmParametersSpi,BaseAlgorithmParameters
public abstract class AlgorithmParametersSpi extends Object
AlgorithmParametersSpi is the Service Provider Interface (SPI)
definition for AlgorithmParameters.- See Also:
AlgorithmParameters
-
Constructor Summary
Constructors Constructor Description AlgorithmParametersSpi() -
Method Summary
Modifier and Type Method Description protected abstract byte[]engineGetEncoded()Returns the parameters in their default encoding format.protected abstract byte[]engineGetEncoded(String format)Returns the parameters in the specified encoding format.protected abstract <T extends AlgorithmParameterSpec>
TengineGetParameterSpec(Class<T> paramSpec)Returns theAlgorithmParameterSpecfor thisAlgorithmParametersSpi.protected abstract voidengineInit(byte[] params)Initializes thisAlgorithmParametersSpiwith the specifiedbyte[]using the default decoding format for parameters.protected abstract voidengineInit(byte[] params, String format)Initializes thisAlgorithmParametersSpiwith the specifiedbyte[]using the specified decoding format.protected abstract voidengineInit(AlgorithmParameterSpec paramSpec)Initializes thisAlgorithmParametersSpiwith the specifiedAlgorithmParameterSpec.protected abstract StringengineToString()Returns a string containing a concise, human-readable description of thisAlgorithmParametersSpi.
-
Constructor Details
-
AlgorithmParametersSpi
public AlgorithmParametersSpi()
-
-
Method Details
-
engineInit
protected abstract void engineInit(AlgorithmParameterSpec paramSpec) throws InvalidParameterSpecExceptionInitializes thisAlgorithmParametersSpiwith the specifiedAlgorithmParameterSpec.- Parameters:
paramSpec- the parameter specification.- Throws:
InvalidParameterSpecException- if thisAlgorithmParametersSpihas already been initialized or the givenparamSpecis not appropriate for initializing thisAlgorithmParametersSpi.
-
engineInit
Initializes thisAlgorithmParametersSpiwith the specifiedbyte[]using the default decoding format for parameters. The default encoding format is ASN.1.- Parameters:
params- the encoded parameters.- Throws:
IOException- if thisAlgorithmParametersSpihas already been initialized, or the parameter could not be encoded.
-
engineInit
Initializes thisAlgorithmParametersSpiwith the specifiedbyte[]using the specified decoding format.- Parameters:
params- the encoded parameters.format- the name of the decoding format.- Throws:
IOException- if thisAlgorithmParametersSpihas already been initialized, or the parameter could not be encoded.
-
engineGetParameterSpec
protected abstract <T extends AlgorithmParameterSpec> T engineGetParameterSpec(Class<T> paramSpec) throws InvalidParameterSpecExceptionReturns theAlgorithmParameterSpecfor thisAlgorithmParametersSpi.- Parameters:
paramSpec- the type of the parameter specification in which this parameters should be converted.- Returns:
- the
AlgorithmParameterSpecfor thisAlgorithmParametersSpi. - Throws:
InvalidParameterSpecException- if thisAlgorithmParametersSpihas already been initialized, or if this parameters could not be converted to the specified class.
-
engineGetEncoded
Returns the parameters in their default encoding format. The default encoding format is ASN.1.- Returns:
- the encoded parameters.
- Throws:
IOException- if thisAlgorithmParametersSpihas already been initialized, or if this parameters could not be encoded.
-
engineGetEncoded
Returns the parameters in the specified encoding format.- Parameters:
format- the name of the encoding format.- Returns:
- the encoded parameters.
- Throws:
IOException- if thisAlgorithmParametersSpihas already been initialized, or if this parameters could not be encoded.
-
engineToString
Returns a string containing a concise, human-readable description of thisAlgorithmParametersSpi.- Returns:
- a printable representation for this
AlgorithmParametersSpi.
-