de.flexiprovider.api.parameters
Class AlgorithmParameters

java.lang.Object
  |
  +--java.security.AlgorithmParametersSpi
        |
        +--de.flexiprovider.api.parameters.AlgorithmParameters
Direct Known Subclasses:
DSAParameters, ECParameters, IQDSAParameters, IQGQParameters, IQRDSAParameters, ModeParameters, PBEParameters, PBES2Parameters, PBKDF2Parameters, PSSParameters, RC5Parameters, RijndaelParameters, RSAOAEPParameters

public abstract class AlgorithmParameters
extends java.security.AlgorithmParametersSpi

This class defines the interface used to manage algorithm parameters.

See Also:
AlgorithmParameterSpec

Constructor Summary
AlgorithmParameters()
           
 
Method Summary
protected  byte[] engineGetEncoded()
          JCA adapter for FlexiAPI method getEncoded(): return the parameters in their primary encoding format.
protected  byte[] engineGetEncoded(java.lang.String format)
          JCA adapter for FlexiAPI method getEncoded(String): return the parameters in the specified encoding format.
protected  java.security.spec.AlgorithmParameterSpec engineGetParameterSpec(java.lang.Class paramSpec)
          JCA adapter for FlexiAPI method getParameterSpec(Class): return a (transparent) specification of this parameters object.
protected  void engineInit(java.security.spec.AlgorithmParameterSpec params)
          JCA adapter for FlexiAPI method init(AlgorithmParameterSpec): initialize this parameters object using the parameters specified in paramSpec.
protected  void engineInit(byte[] params)
          JCA adapter for FlexiAPI method init(byte[]): import the specified parameters and decode them according to the primary decoding format for parameters.
protected  void engineInit(byte[] params, java.lang.String format)
          JCA adapter for FlexiAPI method init(byte[], String): import the specified parameters and decode them according to the specified decoding format.
protected  java.lang.String engineToString()
          JCA adapter for FlexiAPI method toString().
abstract  byte[] getEncoded()
          Encode the parameters according to the primary encoding format (ASN.1).
abstract  byte[] getEncoded(java.lang.String format)
          Encode the parameters according to the specified encoding format.
abstract  AlgorithmParameterSpec getParameterSpec(java.lang.Class paramSpec)
          Return a transparent specification of the parameters.
abstract  void init(AlgorithmParameterSpec paramSpec)
          Initialize the parameters with the given parameter specification.
abstract  void init(byte[] encParams)
          Import the given encoded parameters and decode them according to the primary encoding format (ASN.1).
abstract  void init(byte[] encParams, java.lang.String format)
          Import the given encoded parameters and decode them according to the specified encoding format.
abstract  java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AlgorithmParameters

public AlgorithmParameters()
Method Detail

engineInit

protected void engineInit(java.security.spec.AlgorithmParameterSpec params)
                   throws java.security.spec.InvalidParameterSpecException
JCA adapter for FlexiAPI method init(AlgorithmParameterSpec): initialize this parameters object using the parameters specified in paramSpec.
Overrides:
engineInit in class java.security.AlgorithmParametersSpi
Parameters:
params - the parameter specification
Throws:
java.security.spec.InvalidParameterSpecException - if paramSpec is inappropriate for initialization.

engineInit

protected final void engineInit(byte[] params)
                         throws java.io.IOException
JCA adapter for FlexiAPI method init(byte[]): import the specified parameters and decode 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.
Overrides:
engineInit in class java.security.AlgorithmParametersSpi
Parameters:
params - the encoded parameters
Throws:
java.io.IOException - on decoding errors.

engineInit

protected final void engineInit(byte[] params,
                                java.lang.String format)
                         throws java.io.IOException
JCA adapter for FlexiAPI method init(byte[], String): import the specified parameters and decode 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.
Overrides:
engineInit in class java.security.AlgorithmParametersSpi
Parameters:
params - the encoded parameters
format - the decoding format
Throws:
java.io.IOException - on decoding errors.

engineGetEncoded

protected final byte[] engineGetEncoded()
                                 throws java.io.IOException
JCA adapter for FlexiAPI method getEncoded(): return 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.
Overrides:
engineGetEncoded in class java.security.AlgorithmParametersSpi
Returns:
the parameters encoded in their primary encoding format
Throws:
java.io.IOException - on encoding errors.

engineGetEncoded

protected final byte[] engineGetEncoded(java.lang.String format)
                                 throws java.io.IOException
JCA adapter for FlexiAPI method getEncoded(String): return the parameters in the specified encoding format. If format is null, the primary decoding format is used. The primary encoding format for parameters is ASN.1, if an ASN.1 specification for this type of parameters exists.
Overrides:
engineGetEncoded in class java.security.AlgorithmParametersSpi
Parameters:
format - the encoding format
Returns:
the parameters encoded in the specified encoding format
Throws:
java.io.IOException - on encoding errors.

engineGetParameterSpec

protected java.security.spec.AlgorithmParameterSpec engineGetParameterSpec(java.lang.Class paramSpec)
                                                                    throws java.security.spec.InvalidParameterSpecException
JCA adapter for FlexiAPI method getParameterSpec(Class): return 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.
Overrides:
engineGetParameterSpec in class java.security.AlgorithmParametersSpi
Parameters:
paramSpec - the the specification class in which the parameters should be returned
Returns:
the parameter specification
Throws:
java.security.spec.InvalidParameterSpecException - if the requested parameter specification is inappropriate for this parameter object.

engineToString

protected final java.lang.String engineToString()
JCA adapter for FlexiAPI method toString().
Overrides:
engineToString in class java.security.AlgorithmParametersSpi
Returns:
a human readable form of this parameters object

init

public abstract void init(AlgorithmParameterSpec paramSpec)
                   throws InvalidParameterSpecException
Initialize the parameters with the given parameter specification.
Parameters:
paramSpec - the parameter specification
Throws:
InvalidParameterSpecException - if the parameter specification is null or of an unsupported type.

init

public abstract void init(byte[] encParams)
                   throws java.io.IOException
Import the given encoded parameters and decode them according to the primary encoding format (ASN.1).
Parameters:
encParams - the encoded parameters
Throws:
java.io.IOException - on decoding errors.

init

public abstract void init(byte[] encParams,
                          java.lang.String format)
                   throws java.io.IOException
Import the given encoded parameters and decode them according to the specified encoding format.
Parameters:
encParams - the encoded parameters
format - the encoding format
Throws:
java.io.IOException - on decoding errors or if the encoding format is null or not supported.

getEncoded

public abstract byte[] getEncoded()
                           throws java.io.IOException
Encode the parameters according to the primary encoding format (ASN.1).
Returns:
the encoded parameters
Throws:
java.io.IOException - on encoding errors.

getEncoded

public abstract byte[] getEncoded(java.lang.String format)
                           throws java.io.IOException
Encode the parameters according to the specified encoding format.
Parameters:
format - the encoding format
Returns:
the encoded parameters
Throws:
java.io.IOException - on encoding errors or if the encoding format is null or not supported.

getParameterSpec

public abstract AlgorithmParameterSpec getParameterSpec(java.lang.Class paramSpec)
                                                 throws InvalidParameterSpecException
Return a transparent specification of the parameters.
Parameters:
paramSpec - the desired parameter specification type
Returns:
the parameter specification
Throws:
InvalidParameterSpecException - if the parameter specification type is null or or not supported

toString

public abstract java.lang.String toString()
Overrides:
toString in class java.lang.Object
Returns:
a human readable form of the parameters