|
IAIK CMS/SMIME Toolkit API Documentation
Version 6.1 |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectiaik.cms.SignerIdentifier
public class SignerIdentifier
The CMS type SignerIdentifier.
A SignerIdentifier is used for identifying the signer certificate of a CMS SignerInfo.
It is defined as ASN.1 CHOICE of IssuerAndSerialNumber
or SubjectKeyIdentifier (see RFC 5652):
SignerIdentifier ::= CHOICE {
issuerAndSerialNumber IssuerAndSerialNumber,
subjectKeyIdentifier [0] SubjectKeyIdentifier }
| Field Summary |
|---|
| Fields inherited from interface iaik.cms.KeyIdentifier |
|---|
ISSUER_AND_SERIALNUMBER, KEK_IDENTIFIER, ORIGINATOR_PUBLIC_KEY, RECIPIENT_KEY_IDENTIFIER, SUBJECT_KEY_IDENTIFIER |
| Constructor Summary | |
|---|---|
SignerIdentifier(iaik.asn1.ASN1Object obj)
Creates a SignerIdentifier from an ASN1Object. |
|
SignerIdentifier(CertificateIdentifier certificateIdentifier)
Creates a SignerIdentifier from the given IssuerAndSerialNumber or SubjectKeyID. |
|
SignerIdentifier(java.io.InputStream is)
Creates a SignerIdentifier and parses a DER encoded SignerIdentifier from the given input stream. |
|
| Method Summary | |
|---|---|
void |
clearEncoded()
Clears the encoded SignerIdentifier. |
void |
decode(iaik.asn1.ASN1Object obj)
Decodes the SignerRecipientIdentifier from the given ASN1Object. |
void |
decode(java.io.InputStream is)
Decodes the SignerIdentifier from the given input stream. |
void |
decode(java.io.InputStream is,
boolean keepEncoding)
Decodes the SignerIdentifier from the given input stream. |
boolean |
equals(java.lang.Object obj)
Compares this SignerRecipientIdentifier to the specified object. |
CertificateIdentifier |
getCertificateIdentifier()
Gets the CertificateIdentifier this SignerIdentifier represents. |
byte[] |
getEncoded()
Returns the DER encoded SignerIdentifier. |
int |
getKeyIdType()
Returns the key identifier type this class represents. |
java.lang.String |
getKeyIdTypeName()
Returns the key (certificate) identifier type this class represents as string. |
int |
hashCode()
Returns a hashcode for this SignerRecipientIdentifier. |
boolean |
identifiesCert(iaik.x509.X509Certificate cert)
Checks if the given certificate is identified by this CertificateIdentifier. |
iaik.asn1.ASN1Object |
toASN1Object()
Returns this SignerIdentifier as ASN1Object. |
java.lang.String |
toString()
Returns a String representation of this SignerRecipientKeyIdentifier. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public SignerIdentifier(CertificateIdentifier certificateIdentifier)
certificateIdentifier - the IssuerAndSerialNumber or SubjectKeyID to
be used for identifying the certificate
public SignerIdentifier(iaik.asn1.ASN1Object obj)
throws iaik.asn1.CodingException
obj - the SignerIdentifier as ASN1Object
iaik.asn1.CodingException - if the ASN1Object cannot be decoded or
is invalid structured
public SignerIdentifier(java.io.InputStream is)
throws java.io.IOException,
iaik.asn1.CodingException
is - the input stream from which to parse the encoded SignerIdentifier
iaik.asn1.CodingException - if the SignerIdentifier cannot be parsed
java.io.IOException - if an error occurs when reading from the stream| Method Detail |
|---|
public CertificateIdentifier getCertificateIdentifier()
IssuerAndSerialNumber
or SubjectKeyIdentifier object, depending
on the certificate identifier type this SignerIdentifier
represents
public void decode(java.io.InputStream is)
throws iaik.asn1.CodingException,
java.io.IOException
is - the input stream from which to parse the encoded SignerIdentifier
iaik.asn1.CodingException - if the SignerIdentifier cannot be parsed
java.io.IOException - if an error occurs when reading from the stream
public void decode(java.io.InputStream is,
boolean keepEncoding)
throws iaik.asn1.CodingException,
java.io.IOException
is - the input stream from which to parse the encoded SignerIdentifierkeepEncoding - whether to keep the encoding
iaik.asn1.CodingException - if the SignerIdentifier cannot be parsed
java.io.IOException - if an error occurs when reading from the streampublic iaik.asn1.ASN1Object toASN1Object()
toASN1Object in interface iaik.asn1.ASN1Typepublic byte[] getEncoded()
public void clearEncoded()
toASN1Object() or
getEncoded() will build the internal ASN.1 structure
anew.
public boolean identifiesCert(iaik.x509.X509Certificate cert)
identifiesCert in interface CertificateIdentifiercert - the certificate to be checked of being identified
by this CertificateIdentifier
true if the given certificate is identified by this
CertificateIdentifier, false
otherwise
public void decode(iaik.asn1.ASN1Object obj)
throws iaik.asn1.CodingException
decode in interface iaik.asn1.ASN1Typeobj - the SignerRecipientIdentifier as ASN1Object
iaik.asn1.CodingException - if the ASN1Object cannot be decoded or
is invalid structuredpublic boolean equals(java.lang.Object obj)
SignerRecipientIdentifier to the specified object.
equals in interface KeyIdentifierequals in class java.lang.Objectobj - the object to compare this SignerRecipientIdentifier
against.
true, if the given object is equal to this
SignerRecipientIdentifier,
false otherwisepublic int hashCode()
SignerRecipientIdentifier.
hashCode in interface KeyIdentifierhashCode in class java.lang.ObjectSignerRecipientIdentifierpublic int getKeyIdType()
getKeyIdType in interface KeyIdentifierpublic java.lang.String getKeyIdTypeName()
getKeyIdTypeName in interface KeyIdentifierpublic java.lang.String toString()
toString in interface KeyIdentifiertoString in class java.lang.Object
|
IAIK CMS/SMIME Toolkit API Documentation
Version 6.1 |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
|
v6.1 (c) 2002 IAIK, (c) 2003 - 2025 SIC |
|