|
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.cms.attributes.CMSContentType
public class CMSContentType
The CMS ContentType attribute.
The Cryptographic Message Syntax (CMS) (RFC 5652)
specifies the ContentType attribute to be included as an signed attribute in a
SignerInfo for representing the type of the content included in the corresponding SignedData
or as an authenticated attribute in a AuthenticatedData:
ContentType ::= OBJECT IDENTIFIER
id-contentType OBJECT IDENTIFIER ::= { iso(1) member-body(2)
us(840) rsadsi(113549) pkcs(1) pkcs9(9) 3 }
As soon as there are any signed attributes are present, the ContentType
attribute has to be included to specify the type the content of the
corresponding SignedData represents.
When creating a ContentType attribute
the content type oid has to be supplied, e.g.:
CMSContentType contentType = new CMSContentType(ObjectID.cms_data);
SignerInfo| Field Summary | |
|---|---|
static iaik.asn1.ObjectID |
oid
The attributeType object identifier of the CMS ContentType attribute. |
| Constructor Summary | |
|---|---|
CMSContentType()
Empty default constructor. |
|
CMSContentType(iaik.asn1.ASN1Object obj)
Creates an CMS ContentType from its ASN.1 representation. |
|
CMSContentType(iaik.asn1.ObjectID contentType)
Creates a CMS ContentType for the given content type OID. |
|
| Method Summary | |
|---|---|
void |
decode(iaik.asn1.ASN1Object obj)
Decodes the given ASN.1 ContentType object for parsing
the internal structure. |
boolean |
equals(java.lang.Object obj)
Compares this ContentType to the specified object. |
iaik.asn1.ObjectID |
get()
Returns the content type oid. |
iaik.asn1.ObjectID |
getAttributeType()
Returns the OID identifying the ContentType attribute type. |
int |
hashCode()
Returns a hashcode for this object. |
boolean |
multipleAllowed()
Returns false since only one AttributeValue is
allowed in the SET OF AttributeValue of an ContentType attribute. |
iaik.asn1.ASN1Object |
toASN1Object()
Returns this ContentType as ASN1Object. |
java.lang.String |
toString()
Returns a string representation of this ContentType. |
| Methods inherited from class iaik.asn1.structures.AttributeValue |
|---|
getName |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final iaik.asn1.ObjectID oid
| Constructor Detail |
|---|
public CMSContentType()
public CMSContentType(iaik.asn1.ObjectID contentType)
contentType - the content type oidpublic CMSContentType(iaik.asn1.ASN1Object obj)
obj - the CMS ContentType as ASN1Object (object identifier)| Method Detail |
|---|
public iaik.asn1.ObjectID get()
public boolean equals(java.lang.Object obj)
ContentType to the specified object.
equals in class java.lang.Objectobj - the object to compare this ContentType
against.
true, if the given object is equal to this
ContentType,
false otherwisepublic int hashCode()
hashCode in class java.lang.Objectpublic void decode(iaik.asn1.ASN1Object obj)
ContentType object for parsing
the internal structure.
obj - the ContentType as ASN1Object
public iaik.asn1.ASN1Object toASN1Object()
throws iaik.asn1.CodingException
iaik.asn1.CodingException - if the ASN1Object cannot be builtpublic iaik.asn1.ObjectID getAttributeType()
getAttributeType in class iaik.asn1.structures.AttributeValuepublic boolean multipleAllowed()
false since only one AttributeValue is
allowed in the SET OF AttributeValue of an ContentType attribute.
multipleAllowed in class iaik.asn1.structures.AttributeValuefalse since only one attribute value is allowedpublic 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 |
|