java.security
Class AlgorithmParametersSpi

java.lang.Object sample code for java.lang.Object definition code for java.lang.Object 
  extended by java.security.AlgorithmParametersSpi

public abstract class AlgorithmParametersSpi
extends Object sample code for java.lang.Object definition code for java.lang.Object

This class defines the Service Provider Interface (SPI) for the AlgorithmParameters class, which is used to manage algorithm parameters.

All the abstract methods in this class must be implemented by each cryptographic service provider who wishes to supply parameter management for a particular algorithm.

Since:
1.2
See Also:
AlgorithmParameters sample code for java.security.AlgorithmParameters definition code for java.security.AlgorithmParameters , AlgorithmParameterSpec sample code for java.security.spec.AlgorithmParameterSpec definition code for java.security.spec.AlgorithmParameterSpec , DSAParameterSpec sample code for java.security.spec.DSAParameterSpec definition code for java.security.spec.DSAParameterSpec

Constructor Summary
AlgorithmParametersSpi sample code for java.security.AlgorithmParametersSpi.AlgorithmParametersSpi() definition code for java.security.AlgorithmParametersSpi.AlgorithmParametersSpi() ()
           
 
Method Summary
protected abstract  byte[] engineGetEncoded sample code for java.security.AlgorithmParametersSpi.engineGetEncoded() definition code for java.security.AlgorithmParametersSpi.engineGetEncoded() ()
          Returns the parameters in their primary encoding format.
protected abstract  byte[] engineGetEncoded sample code for java.security.AlgorithmParametersSpi.engineGetEncoded(java.lang.String) definition code for java.security.AlgorithmParametersSpi.engineGetEncoded(java.lang.String) (String sample code for java.lang.String definition code for java.lang.String  format)
          Returns the parameters encoded in the specified format.
protected abstract
<T extends AlgorithmParameterSpec sample code for java.security.spec.AlgorithmParameterSpec definition code for java.security.spec.AlgorithmParameterSpec >
T
engineGetParameterSpec sample code for java.security.AlgorithmParametersSpi.engineGetParameterSpec(java.lang.Class) definition code for java.security.AlgorithmParametersSpi.engineGetParameterSpec(java.lang.Class) (Class sample code for java.lang.Class definition code for java.lang.Class <T> paramSpec)
          Returns a (transparent) specification of this parameters object.
protected abstract  void engineInit sample code for java.security.AlgorithmParametersSpi.engineInit(java.security.spec.AlgorithmParameterSpec) definition code for java.security.AlgorithmParametersSpi.engineInit(java.security.spec.AlgorithmParameterSpec) (AlgorithmParameterSpec sample code for java.security.spec.AlgorithmParameterSpec definition code for java.security.spec.AlgorithmParameterSpec  paramSpec)
          Initializes this parameters object using the parameters specified in paramSpec.
protected abstract  void engineInit sample code for java.security.AlgorithmParametersSpi.engineInit(byte[]) definition code for java.security.AlgorithmParametersSpi.engineInit(byte[]) (byte[] params)
          Imports the specified parameters and decodes them according to the primary decoding format for parameters.
protected abstract  void engineInit sample code for java.security.AlgorithmParametersSpi.engineInit(byte[], java.lang.String) definition code for java.security.AlgorithmParametersSpi.engineInit(byte[], java.lang.String) (byte[] params, String sample code for java.lang.String definition code for java.lang.String  format)
          Imports the parameters from params and decodes them according to the specified decoding format.
protected abstract  String sample code for java.lang.String definition code for java.lang.String engineToString sample code for java.security.AlgorithmParametersSpi.engineToString() definition code for java.security.AlgorithmParametersSpi.engineToString() ()
          Returns a formatted string describing the parameters.
 
Methods inherited from class java.lang.Object sample code for java.lang.Object definition code for java.lang.Object
clone sample code for java.lang.Object.clone() definition code for java.lang.Object.clone() , equals sample code for java.lang.Object.equals(java.lang.Object) definition code for java.lang.Object.equals(java.lang.Object) , finalize sample code for java.lang.Object.finalize() definition code for java.lang.Object.finalize() , getClass sample code for java.lang.Object.getClass() definition code for java.lang.Object.getClass() , hashCode sample code for java.lang.Object.hashCode() definition code for java.lang.Object.hashCode() , notify sample code for java.lang.Object.notify() definition code for java.lang.Object.notify() , notifyAll sample code for java.lang.Object.notifyAll() definition code for java.lang.Object.notifyAll() , toString sample code for java.lang.Object.toString() definition code for java.lang.Object.toString() , wait sample code for java.lang.Object.wait() definition code for java.lang.Object.wait() , wait sample code for java.lang.Object.wait(long) definition code for java.lang.Object.wait(long) , wait sample code for java.lang.Object.wait(long, int) definition code for java.lang.Object.wait(long, int)
 

Constructor Detail

AlgorithmParametersSpi sample code for java.security.AlgorithmParametersSpi() definition code for java.security.AlgorithmParametersSpi()

public AlgorithmParametersSpi()
Method Detail

engineInit sample code for java.security.AlgorithmParametersSpi.engineInit(java.security.spec.AlgorithmParameterSpec) definition code for java.security.AlgorithmParametersSpi.engineInit(java.security.spec.AlgorithmParameterSpec)

protected abstract void engineInit(AlgorithmParameterSpec sample code for java.security.spec.AlgorithmParameterSpec definition code for java.security.spec.AlgorithmParameterSpec  paramSpec)
                            throws InvalidParameterSpecException sample code for java.security.spec.InvalidParameterSpecException definition code for java.security.spec.InvalidParameterSpecException 
Initializes this parameters object using the parameters specified in paramSpec.

Parameters:
paramSpec - the parameter specification.
Throws:
InvalidParameterSpecException sample code for java.security.spec.InvalidParameterSpecException definition code for java.security.spec.InvalidParameterSpecException - if the given parameter specification is inappropriate for the initialization of this parameter object.

engineInit sample code for java.security.AlgorithmParametersSpi.engineInit(byte[]) definition code for java.security.AlgorithmParametersSpi.engineInit(byte[])

protected abstract void engineInit(byte[] params)
                            throws IOException sample code for java.io.IOException definition code for java.io.IOException 
Imports the specified parameters and decodes them according to the primary decoding format for parameters. The primary decoding format for parameters is ASN.1, if an ASN.1 specification for this type of parameters exists.

Parameters:
params - the encoded parameters.
Throws:
IOException sample code for java.io.IOException definition code for java.io.IOException - on decoding errors

engineInit sample code for java.security.AlgorithmParametersSpi.engineInit(byte[], java.lang.String) definition code for java.security.AlgorithmParametersSpi.engineInit(byte[], java.lang.String)

protected abstract void engineInit(byte[] params,
                                   String sample code for java.lang.String definition code for java.lang.String  format)
                            throws IOException sample code for java.io.IOException definition code for java.io.IOException 
Imports the parameters from params and decodes them according to the specified decoding format. If format is null, the primary decoding format for parameters is used. The primary decoding format is ASN.1, if an ASN.1 specification for these parameters exists.

Parameters:
params - the encoded parameters.
format - the name of the decoding format.
Throws:
IOException sample code for java.io.IOException definition code for java.io.IOException - on decoding errors

engineGetParameterSpec sample code for java.security.AlgorithmParametersSpi.<T extends java.security.spec.AlgorithmParameterSpec>engineGetParameterSpec(java.lang.Class<T>) definition code for java.security.AlgorithmParametersSpi.<T extends java.security.spec.AlgorithmParameterSpec>engineGetParameterSpec(java.lang.Class<T>)

protected abstract <T extends AlgorithmParameterSpec sample code for java.security.spec.AlgorithmParameterSpec definition code for java.security.spec.AlgorithmParameterSpec > T engineGetParameterSpec(Class sample code for java.lang.Class definition code for java.lang.Class <T> paramSpec)
                                                                    throws InvalidParameterSpecException sample code for java.security.spec.InvalidParameterSpecException definition code for java.security.spec.InvalidParameterSpecException 
Returns a (transparent) specification of this parameters object. paramSpec identifies the specification class in which the parameters should be returned. It could, for example, be DSAParameterSpec.class, to indicate that the parameters should be returned in an instance of the DSAParameterSpec class.

Parameters:
paramSpec - the the specification class in which the parameters should be returned.
Returns:
the parameter specification.
Throws:
InvalidParameterSpecException sample code for java.security.spec.InvalidParameterSpecException definition code for java.security.spec.InvalidParameterSpecException - if the requested parameter specification is inappropriate for this parameter object.

engineGetEncoded sample code for java.security.AlgorithmParametersSpi.engineGetEncoded() definition code for java.security.AlgorithmParametersSpi.engineGetEncoded()

protected abstract byte[] engineGetEncoded()
                                    throws IOException sample code for java.io.IOException definition code for java.io.IOException 
Returns the parameters in their primary encoding format. The primary encoding format for parameters is ASN.1, if an ASN.1 specification for this type of parameters exists.

Returns:
the parameters encoded using the specified encoding scheme.
Throws:
IOException sample code for java.io.IOException definition code for java.io.IOException - on encoding errors.

engineGetEncoded sample code for java.security.AlgorithmParametersSpi.engineGetEncoded(java.lang.String) definition code for java.security.AlgorithmParametersSpi.engineGetEncoded(java.lang.String)

protected abstract byte[] engineGetEncoded(String sample code for java.lang.String definition code for java.lang.String  format)
                                    throws IOException sample code for java.io.IOException definition code for java.io.IOException 
Returns the parameters encoded in the specified format. If format is null, the primary encoding format for parameters is used. The primary encoding format is ASN.1, if an ASN.1 specification for these parameters exists.

Parameters:
format - the name of the encoding format.
Returns:
the parameters encoded using the specified encoding scheme.
Throws:
IOException sample code for java.io.IOException definition code for java.io.IOException - on encoding errors.

engineToString sample code for java.security.AlgorithmParametersSpi.engineToString() definition code for java.security.AlgorithmParametersSpi.engineToString()

protected abstract String sample code for java.lang.String definition code for java.lang.String  engineToString()
Returns a formatted string describing the parameters.

Returns:
a formatted string describing the parameters.