|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object iaik.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 ObjectID |
oid
The attributeType object identifier of the CMS ContentType attribute. |
Constructor Summary | |
---|---|
CMSContentType()
Empty default constructor. |
|
CMSContentType(ASN1Object obj)
Creates an CMS ContentType from its ASN.1 representation. |
|
CMSContentType(ObjectID contentType)
Creates a CMS ContentType for the given content type OID. |
Method Summary | |
---|---|
void |
decode(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. |
ObjectID |
get()
Returns the content type oid. |
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. |
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 ObjectID oid
Constructor Detail |
---|
public CMSContentType()
public CMSContentType(ObjectID contentType)
contentType
- the content type oidpublic CMSContentType(ASN1Object obj)
obj
- the CMS ContentType as ASN1Object (object identifier)Method Detail |
---|
public ObjectID get()
public boolean equals(java.lang.Object obj)
ContentType
to the specified object.
equals
in class java.lang.Object
obj
- 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.Object
public void decode(ASN1Object obj)
ContentType
object for parsing
the internal structure.
obj
- the ContentType as ASN1Objectpublic ASN1Object toASN1Object() throws CodingException
CodingException
- if the ASN1Object cannot be builtpublic ObjectID getAttributeType()
getAttributeType
in class AttributeValue
public boolean multipleAllowed()
false
since only one AttributeValue is
allowed in the SET OF AttributeValue of an ContentType attribute.
multipleAllowed
in class AttributeValue
false
since only one attribute value is allowedpublic java.lang.String toString()
toString
in class AttributeValue
|
This Javadoc may contain text parts from text parts from IETF Internet Standard specifications (see copyright note). | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |