public static final class PreferredSignatureAlgorithms.PreferredSignatureAlgorithm
extends java.lang.Object
Constructor and Description |
---|
PreferredSignatureAlgorithms.PreferredSignatureAlgorithm(AlgorithmID sigIdentifier)
Creates a PreferredSignatureAlgorithm with the given signature algorithm identifier.
|
PreferredSignatureAlgorithms.PreferredSignatureAlgorithm(ASN1Object asn1Obj)
Creates a PreferredSignatureAlgorithm from its ASN.1 representation.
|
Modifier and Type | Method and Description |
---|---|
void |
decode(ASN1Object asn1Obj)
Decodes this PreferredSignatureAlgorithm from its ASN.1 representation.
|
boolean |
equals(java.lang.Object obj)
Compares this
PreferredSignatureAlgorithm to the specified object. |
SMIMECapability |
getPubKeyAlgIdentifier()
Gets the public key algorithm identifier the client prefers in
the responder certificate.
|
AlgorithmID |
getSigIdentifier()
Gets the signature algorithm identifier the client prefers.
|
int |
hashCode()
Returns a hash code for this PreferredSignatureAlgorithm.
|
void |
setPubKeyAlgIdentifier(SMIMECapability pubKeyAlgIdentifier)
Sets the public key algorithm identifier the client prefers in
the responder certificate.
|
ASN1Object |
toASN1Object()
Returns this PreferredSignatureAlgorithm as ASN.1 object.
|
java.lang.String |
toString()
Gets a String representation of this object.
|
public PreferredSignatureAlgorithms.PreferredSignatureAlgorithm(AlgorithmID sigIdentifier)
sigIdentifier
- the signature algorithm identifier (will not be cloned)public PreferredSignatureAlgorithms.PreferredSignatureAlgorithm(ASN1Object asn1Obj) throws CodingException
asn1Obj
- the ASN.1 representation of the PreferredSignatureAlgorithmCodingException
- if the ASN1Object could not be parsedpublic void setPubKeyAlgIdentifier(SMIMECapability pubKeyAlgIdentifier)
pubKeyAlgIdentifier
- the public key algorithm identifierpublic SMIMECapability getPubKeyAlgIdentifier()
null
if no
public key algorithm identifier is includedpublic AlgorithmID getSigIdentifier()
public void decode(ASN1Object asn1Obj) throws CodingException
A PreferredSignatureAlgorithm specifies the preferred signature algorithm and (optionally) the public key algorithm identifier the client prefers in the responder certificate:
PreferredSignatureAlgorithm ::= SEQUENCE { sigIdentifier AlgorithmIdentifier, pubKeyAlgIdentifier SMIMECapability OPTIONAL }
asn1Obj
- the ASN.1 representation of the PreferredSignatureAlgorithmCodingException
- if the ASN1Object could not be parsedpublic ASN1Object toASN1Object() throws CodingException
A PreferredSignatureAlgorithm specifies the preferred signature algorithm and (optionally) the public key algorithm identifier the client prefers in the responder certificate:
PreferredSignatureAlgorithm ::= SEQUENCE { sigIdentifier AlgorithmIdentifier, pubKeyAlgIdentifier SMIMECapability OPTIONAL }
CodingException
- if the ASN1Object cannot be createdpublic int hashCode()
The hash code is calculated from the signature algorithm identifier only.
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
PreferredSignatureAlgorithm
to the specified object.
equals
in class java.lang.Object
obj
- the object to compare this PreferredSignatureAlgorithm
against.true
, if the given object is equal to this
PreferredSignatureAlgorithm
,
false
otherwisepublic java.lang.String toString()
toString
in class java.lang.Object