Class ContentInfo
- java.lang.Object
-
- org.mozilla.jss.netscape.security.pkcs.ContentInfo
-
public class ContentInfo extends java.lang.Object
A ContentInfo type, as defined in PKCS#7.
-
-
Field Summary
Fields Modifier and Type Field Description static ObjectIdentifier
DATA_OID
static ObjectIdentifier
DIGESTED_DATA_OID
static ObjectIdentifier
ENCRYPTED_DATA_OID
static ObjectIdentifier
ENVELOPED_DATA_OID
static ObjectIdentifier
PKCS7_OID
static ObjectIdentifier
SIGNED_AND_ENVELOPED_DATA_OID
static ObjectIdentifier
SIGNED_DATA_OID
-
Constructor Summary
Constructors Constructor Description ContentInfo(byte[] bytes)
Make a contentInfo of type data.ContentInfo(DerInputStream derin)
ContentInfo(ObjectIdentifier contentType, DerValue content)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
encode(DerOutputStream out)
DerValue
getContent()
byte[]
getContentBytes()
Returns a byte array representation of the data held in the content field.byte[]
getData()
java.lang.String
toString()
-
-
-
Field Detail
-
PKCS7_OID
public static final ObjectIdentifier PKCS7_OID
-
DATA_OID
public static final ObjectIdentifier DATA_OID
-
SIGNED_DATA_OID
public static final ObjectIdentifier SIGNED_DATA_OID
-
ENVELOPED_DATA_OID
public static final ObjectIdentifier ENVELOPED_DATA_OID
-
SIGNED_AND_ENVELOPED_DATA_OID
public static final ObjectIdentifier SIGNED_AND_ENVELOPED_DATA_OID
-
DIGESTED_DATA_OID
public static final ObjectIdentifier DIGESTED_DATA_OID
-
ENCRYPTED_DATA_OID
public static final ObjectIdentifier ENCRYPTED_DATA_OID
-
-
Constructor Detail
-
ContentInfo
public ContentInfo(ObjectIdentifier contentType, DerValue content)
-
ContentInfo
public ContentInfo(byte[] bytes)
Make a contentInfo of type data.
-
ContentInfo
public ContentInfo(DerInputStream derin) throws java.io.IOException, ParsingException
- Throws:
java.io.IOException
ParsingException
-
-
Method Detail
-
getContent
public DerValue getContent()
-
getData
public byte[] getData() throws java.io.IOException
- Throws:
java.io.IOException
-
encode
public void encode(DerOutputStream out) throws java.io.IOException
- Throws:
java.io.IOException
-
getContentBytes
public byte[] getContentBytes() throws java.io.IOException
Returns a byte array representation of the data held in the content field.- Throws:
java.io.IOException
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-