de.flexiprovider.ec.parameters
Class ECParameters
java.lang.Object
|
+--java.security.AlgorithmParametersSpi
|
+--de.flexiprovider.api.parameters.AlgorithmParameters
|
+--de.flexiprovider.ec.parameters.ECParameters
- public class ECParameters
- extends AlgorithmParameters
This class specifies the EC Domain Parameters for the standard IEEE 1363 . For further
information, please consult the package description of de.flexiprovider.ec.ecparameters, de.flexiprovider.ec.ecdsa, de.flexiprovider.ec.ecnr, or de.flexiprovider.ec.ecdh.
- Author:
- Birgit Henhapl
|
Field Summary |
static java.lang.String |
OID
The OID for ECDSA parameters. |
|
Method Summary |
ECDomainParameters |
getASN1Params()
Returns the ECParameters in an ASN.1 syntax. |
byte[] |
getEncoded()
Return the parameters encoded in the primary encoding format (ASN.1). |
byte[] |
getEncoded(java.lang.String format)
Return the parameters encoded in the specified encoding format. |
AlgorithmParameterSpec |
getParameterSpec(java.lang.Class paramSpec)
Return a transparent specification of this object. |
void |
init(AlgorithmParameterSpec params)
Initialize this parameters object using the given parameter
specification. |
void |
init(byte[] encParams)
Import the specified parameters and decode them according to the primary
decoding format. |
void |
init(byte[] encParams,
java.lang.String format)
Import the specified parameters and decode them according to the
specified decoding format. |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
OID
public static final java.lang.String OID
- The OID for ECDSA parameters.
ECParameters
public ECParameters()
init
public void init(AlgorithmParameterSpec params)
throws InvalidParameterSpecException
- Initialize this parameters object using the given parameter
specification. The parameter specification has to be an instance of
CurveParams.
- Overrides:
init in class AlgorithmParameters
- Parameters:
params - the parameter specification- Throws:
InvalidParameterSpecException - if the parameter specification is null or of
an unsupported type.
init
public void init(byte[] encParams)
throws java.io.IOException
- Import the specified parameters and decode them according to the primary
decoding format. The primary decoding format for parameters is ASN.1.
- Overrides:
init in class AlgorithmParameters
- Parameters:
encParams - the encoded parameters.- Throws:
java.io.IOException - on decoding errors
init
public void init(byte[] encParams,
java.lang.String format)
throws java.io.IOException
- Import the specified parameters and decode them according to the
specified decoding format. Currently, only the primary decoding format
(ASN.1) is supported.
- Overrides:
init in class AlgorithmParameters
- Parameters:
encParams - the encoded parametersformat - the name of the decoding format- Throws:
java.io.IOException - if format is not equal to "ASN.1" or on decoding errors.
getEncoded
public byte[] getEncoded()
- Return the parameters encoded in the primary encoding format (ASN.1).
- Overrides:
getEncoded in class AlgorithmParameters
- Returns:
- the encoded parameters
getEncoded
public byte[] getEncoded(java.lang.String format)
throws java.io.IOException
- Return the parameters encoded in the specified encoding format.
Currently, only the primary encoding format (ASN.1) is supported.
- Overrides:
getEncoded in class AlgorithmParameters
- Parameters:
format - the name of the encoding format- Returns:
- the encoded parameters
- Throws:
java.io.IOException - if format is not equal to "ASN.1" or on decoding errors.
getParameterSpec
public AlgorithmParameterSpec getParameterSpec(java.lang.Class paramSpec)
throws InvalidParameterSpecException
- Return a transparent specification of this object. paramSpec
identifies the specification class in which the parameters should be
returned.
- Overrides:
getParameterSpec in class AlgorithmParameters
- Parameters:
paramSpec - the class of which an instance is to be returned- Returns:
- a specification of this object
- Throws:
InvalidParameterSpecException - if paramSpec is null or not the
same as or a superclass of the type of parameters
specified by init(AlgorithmParameterSpec) or by
init(byte[]).
toString
public java.lang.String toString()
- Overrides:
toString in class AlgorithmParameters
- Returns:
- a human readable form of these parameters
getASN1Params
public ECDomainParameters getASN1Params()
- Returns the ECParameters in an ASN.1 syntax.
- Returns:
- the ECParameters in an ASN.1 syntax