public class EcAlgorithmParameters
extends java.security.AlgorithmParametersSpi
This class provides the capability to convert EC algorithm parameters to/from transparent representation. Currently, the following transparent algorithm parameter representations are supported:
java.security.spec.ECParameterSpec (this includes
EcParameterSpecWithName)java.security.spec.ECGenParameterSpecThis class also provides the capability to convert EC algorithm parameters to/from encoded format. Currently, the following encoding/decoding formats are supported:
EcParameterFactory for details on this
encoding/decoding format
For a detailed description of the values contained in a set of EC algorithm
parameters, refer to EcParameterSpecWithName.
EcParameterSpecWithName,
EcParameterFactory| Constructor and Description |
|---|
EcAlgorithmParameters()
The constructor; creates a new instance of EC algorithm parameters.
|
| Modifier and Type | Method and Description |
|---|---|
protected byte[] |
engineGetEncoded()
Returns the parameters in their primary encoding format.
|
protected byte[] |
engineGetEncoded(java.lang.String format)
Returns the parameters encoded in the specified format.
|
protected <T extends java.security.spec.AlgorithmParameterSpec> |
engineGetParameterSpec(java.lang.Class<T> paramSpec)
Returns a (transparent) specification of this parameters object.
|
protected void |
engineInit(java.security.spec.AlgorithmParameterSpec paramSpec)
Initializes this parameters object using the parameters specified in
paramSpec. |
protected void |
engineInit(byte[] params)
Imports the specified parameters and decodes them according to the
primary decoding format for parameters.
|
protected void |
engineInit(byte[] params,
java.lang.String format)
Imports the parameters from
params and decodes them
according to the specified decoding format. |
protected java.lang.String |
engineToString()
Returns a formatted string describing the parameters.
|
public EcAlgorithmParameters()
Applications should never use this constructor, instead the algorithm
parameters should be requested from the appropriate JCA/JCE cryptographic
service provider as follows:
AlgorithmParameters.getInstance("EC", "Entrust").
protected void engineInit(java.security.spec.AlgorithmParameterSpec paramSpec)
throws java.security.spec.InvalidParameterSpecException
paramSpec.engineInit in class java.security.AlgorithmParametersSpiparamSpec - the parameter specificationjava.security.spec.InvalidParameterSpecException - if the given parameter specification is inappropriate for
the initialization of this parameter objectprotected void engineInit(byte[] params)
throws java.io.IOException
The primary decoding format for EC parameters is ASN.1; for details on
this format refer to EcParameterFactory.
engineInit in class java.security.AlgorithmParametersSpiparams - the encoded parameters.java.io.IOException - on decoding errorsprotected void engineInit(byte[] params,
java.lang.String format)
throws java.io.IOException
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 for EC parameters is
ASN.1; for details on this format refer to EcParameterFactory.
Currently, the following decoding formats are supported: 'ASN.1'.
engineInit in class java.security.AlgorithmParametersSpiparams - the encoded parametersformat - the name of the decoding formatjava.io.IOException - if the decoding format is unsupported or a decoding error
occursprotected byte[] engineGetEncoded()
The primary encoding format for EC parameters is ASN.1; for details on
this format refer to EcParameterFactory.
engineGetEncoded in class java.security.AlgorithmParametersSpiprotected byte[] engineGetEncoded(java.lang.String format)
throws java.io.IOException
If format is null, the primary encoding format for
parameters is used. The primary encoding format for EC parameters is
ASN.1; for details on this format refer to EcParameterFactory.
Currently, the following encoding formats are supported: 'ASN.1'.
engineGetEncoded in class java.security.AlgorithmParametersSpiformat - the name of the encoding formatjava.io.IOException - if the encoding format is unsupportedprotected <T extends java.security.spec.AlgorithmParameterSpec> T engineGetParameterSpec(java.lang.Class<T> paramSpec)
throws java.security.spec.InvalidParameterSpecException
engineGetParameterSpec in class java.security.AlgorithmParametersSpiparamSpec - the specification class in which the parameters should be
returnedjava.security.spec.InvalidParameterSpecException - if the requested parameter specification is inappropriate for
this parameter objectprotected java.lang.String engineToString()
engineToString in class java.security.AlgorithmParametersSpi