|
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.asn1.structures.AttributeValue
iaik.smime.attributes.SMIMEEncryptionKeyPreference
public class SMIMEEncryptionKeyPreference
The S/MIMEv3 SMIMEEncryptionKeyPreference attribute.
S/MIMEv3 (RFC 5751)
specifies the SMIMEEncryptionKeyPreference
attribute to may be included as signed attribute in a SignerInfo to identify encryption certificate of the sender by
by IssuerAndSerialNumber, or
SubjectKeyIdentifier, or
RecipientKeyIdentifier
SMIMEEncryptionKeyPreference ::= CHOICE {
issuerAndSerialNumber [0] IssuerAndSerialNumber,
receipentKeyId [1] RecipientKeyIdentifier,
subjectAltKeyIdentifier [2] SubjectKeyIdentifier
}
id-aa OBJECT IDENTIFIER ::= {iso(1) member-body(2) usa(840)
rsadsi(113549) pkcs(1) pkcs-9(9) smime(16) attributes(2)}
id-aa-encrypKeyPref OBJECT IDENTIFIER ::= {id-aa 11}
When creating
a SMIMEEncryptionKeyPreference object specify the identifier for the encryption certificate of the sender, e.g.:
X509Certificate encyrptionCert = ...; IssuerAndSerialNumber ias = new IssuerAndSerialNumber(encryptionCert); SMIMEEncryptionKeyPreference sMIMEEncryptionKeyPreference = new SMIMEEncryptionKeyPreference(ias);
IssuerAndSerialNumber,
SubjectKeyID,
RecipientKeyIdentifier,
CertificateIdentifier| Field Summary | |
|---|---|
static iaik.asn1.ObjectID |
oid
The attributeType object identifier of this SMIMEEncryptionKeyPreference attribute. |
| Constructor Summary | |
|---|---|
SMIMEEncryptionKeyPreference()
Empty default constructor. |
|
SMIMEEncryptionKeyPreference(iaik.asn1.ASN1Object obj)
Creates an SMIMEEncryptionKeyPreference from its ASN.1 representation. |
|
SMIMEEncryptionKeyPreference(CertificateIdentifier encryptionCertID)
Creates an SMIMEEncryptionKeyPreference for the given encryption cert identifier. |
|
| Method Summary | |
|---|---|
void |
decode(iaik.asn1.ASN1Object obj)
Decodes the given ASN.1 SMIMEEncryptionKeyPreference object for
parsing the internal structure. |
boolean |
equals(java.lang.Object obj)
Compares this SMIMEEncryptionKeyPreference to the specified object. |
iaik.asn1.ObjectID |
getAttributeType()
Returns the OID identifying the SMIMEEncryptionKeyPreference attribute type. |
CertificateIdentifier |
getEncryptionCertID()
Returns the the encryption cert id. |
int |
hashCode()
Returns a hashcode for this MSOEEncryptionKeyPreference. |
iaik.asn1.ASN1Object |
toASN1Object()
Returns this SMIMEEncryptionKeyPreference as ASN1Object. |
java.lang.String |
toString()
Returns a string representation of this SMIMEEncryptionKeyPreference. |
| Methods inherited from class iaik.asn1.structures.AttributeValue |
|---|
getName, multipleAllowed |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final iaik.asn1.ObjectID oid
SMIMEEncryptionKeyPreference attribute.
The corresponding OID string is "1.2.840.113549.1.9.16.2.11".
| Constructor Detail |
|---|
public SMIMEEncryptionKeyPreference()
public SMIMEEncryptionKeyPreference(CertificateIdentifier encryptionCertID)
encryptionCertID - the certificate identifier identifying the
encryption cert of the sender, either by IssuerAndSerialNumber, SubjectKeyIdentifier,
or RecipientKeyIdentifier
public SMIMEEncryptionKeyPreference(iaik.asn1.ASN1Object obj)
throws iaik.asn1.CodingException
obj - the SMIMEEncryptionKeyPreference as ASN1Object
iaik.asn1.CodingException - if the encoding is invalid| Method Detail |
|---|
public CertificateIdentifier getEncryptionCertID()
IssuerAndSerialNumber,
SubjectKeyIdentifier,
or RecipientKeyIdentifier
public void decode(iaik.asn1.ASN1Object obj)
throws iaik.asn1.CodingException
SMIMEEncryptionKeyPreference object for
parsing the internal structure.
obj - the SMIMEEncryptionKeyPreference as ASN1Object
iaik.asn1.CodingException - if the encoding is invalidpublic boolean equals(java.lang.Object obj)
SMIMEEncryptionKeyPreference to the specified object.
equals in class java.lang.Objectobj - the object to compare this SMIMEEncryptionKeyPreference
against.
true, if the given object is equal to this
SMIMEEncryptionKeyPreference,
false otherwisepublic int hashCode()
hashCode in class java.lang.Object
public iaik.asn1.ASN1Object toASN1Object()
throws iaik.asn1.CodingException
iaik.asn1.CodingException - if the ASN.1 object cannot be builtpublic iaik.asn1.ObjectID getAttributeType()
getAttributeType in class iaik.asn1.structures.AttributeValuepublic java.lang.String toString()
toString in class iaik.asn1.structures.AttributeValue
|
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 |
|