public class EcdsaWithSpecifiedParameterSpec extends java.lang.Object implements java.security.spec.AlgorithmParameterSpec, ASN1Type
The SPECIFIEDwithECDSA digital signature algorithm is parameterized by choice of hash algorithm. The hash algorithm is used during signature generation and verification operations.
This class is designed for use specifically with Entrust's SPECIFIEDwithECDSA digital signature algorithm implementation; it will not work with another vendor's implementation.
The ASN.1 representation of these parameters is provided below; it was extracted from ANSI X9.62-2005 Appendix E.10.
-- New OID that indicates the message digest to be specified by the parameters
ecdsa-with-Specified OBJECT IDENTIFIER ::= {id-ecSigType specified(3)}
ALGORITHM ::= {OID ecdsa-with-Specified PARMS HashAlgorithm}
-- Type (parameterized) to indicate the hash function with
-- the OID ecdsa-with-Specified
HashAlgorithm ::= AlgorithmIdentifier {{ ANSIHashFunctions }}
-- Information object set of Approved hash functions
ANSIX9HashFunctions ALGORITHM ::= {
{ OID sha-1 } |
{ OID sha-1 PARMS NULL } |
{ OID id-SHA224 } |
{ OID id-SHA224 PARMS NULL } |
{ OID id-SHA256 } |
{ OID id-SHA256 PARMS NULL } |
{ OID id-SHA384 } |
{ OID id-SHA384 PARMS NULL } |
{ OID id-SHA512 } |
{ OID id-SHA512 PARMS NULL } ,
... -- Additional hash functions may be added
}
EcdsaWithSpecifiedSignature,
EcdsaWithSpecifiedParameters| Constructor and Description |
|---|
EcdsaWithSpecifiedParameterSpec()
The default constructor; creates an
EcdsaWithSpecifiedParameterSpec
object using default parameter values. |
EcdsaWithSpecifiedParameterSpec(AlgorithmID hashAlgorithm)
A constructor; creates an
EcdsaWithSpecifiedParameterSpec
object with the provided hash algorithm parameter value. |
EcdsaWithSpecifiedParameterSpec(ASN1Object obj)
A constructor; creates an
EcdsaWithSpecifiedParameterSpec
object from an ASN1Object. |
| Modifier and Type | Method and Description |
|---|---|
void |
decode(ASN1Object obj)
Decodes an
EcdsaWithSpecifiedParameterSpec object from an
ASN1Object. |
AlgorithmID |
getHashAlgorithm()
Gets the hash algorithm.
|
ASN1Object |
toASN1Object()
Encodes this
EcdsaWithSpecifiedParameterSpec object as an
ASN1Object. |
java.lang.String |
toString()
Creates a text representation of the ASN.1 structure of this
EcdsaWithSpecifiedParameterSpec object. |
public EcdsaWithSpecifiedParameterSpec()
EcdsaWithSpecifiedParameterSpec
object using default parameter values.
The following default parameter values are used:
sha256: {OID id-sha256 PARAMETERS NULL}public EcdsaWithSpecifiedParameterSpec(AlgorithmID hashAlgorithm)
EcdsaWithSpecifiedParameterSpec
object with the provided hash algorithm parameter value.hashAlgorithm - the hash algorithmgetHashAlgorithm()public EcdsaWithSpecifiedParameterSpec(ASN1Object obj) throws CodingException
EcdsaWithSpecifiedParameterSpec
object from an ASN1Object.
The ASN1Object must be a HashAlgorithm structure.
obj - an ASN.1 representation of a HashAlgorithm structureCodingException - thrown if an errors occurs while decoding the
ANS1Objectpublic AlgorithmID getHashAlgorithm()
This identifies the hash algorithm that is to be used during signature generation or verification operations.
public ASN1Object toASN1Object()
EcdsaWithSpecifiedParameterSpec object as an
ASN1Object.toASN1Object in interface ASN1Typepublic void decode(ASN1Object obj) throws CodingException
EcdsaWithSpecifiedParameterSpec object from an
ASN1Object.
The ASN1Object must be a HashAlgorithm structure.
decode in interface ASN1Typeobj - an ASN.1 representation of a HashAlgorithm structureCodingException - thrown if an errors occurs while decoding the
ANS1Objectpublic java.lang.String toString()
EcdsaWithSpecifiedParameterSpec object.toString in class java.lang.Object