public class ContentInfo
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static ObjectIdentifier |
DATA_OID |
static ObjectIdentifier |
DIGESTED_DATA_OID |
static ObjectIdentifier |
ENCRYPTED_DATA_OID |
static ObjectIdentifier |
ENVELOPED_DATA_OID |
static ObjectIdentifier |
NETSCAPE_CERT_SEQUENCE_OID |
static ObjectIdentifier |
OLD_DATA_OID |
static ObjectIdentifier |
OLD_SIGNED_DATA_OID |
static ObjectIdentifier |
PKCS7_OID |
static ObjectIdentifier |
SIGNED_AND_ENVELOPED_DATA_OID |
static ObjectIdentifier |
SIGNED_DATA_OID |
static ObjectIdentifier |
TIMESTAMP_TOKEN_INFO_OID |
| Constructor and Description |
|---|
ContentInfo(byte[] bytes)
Make a contentInfo of type data.
|
ContentInfo(DerInputStream derin)
Parses a PKCS#7 content info.
|
ContentInfo(DerInputStream derin,
boolean oldStyle)
Parses a PKCS#7 content info.
|
ContentInfo(ObjectIdentifier contentType,
DerValue content) |
| Modifier and Type | Method and Description |
|---|---|
void |
encode(DerOutputStream out) |
DerValue |
getContent() |
byte[] |
getContentBytes()
Returns a byte array representation of the data held in
the content field.
|
ObjectIdentifier |
getContentType() |
byte[] |
getData() |
java.lang.String |
toString() |
public static ObjectIdentifier PKCS7_OID
public static ObjectIdentifier DATA_OID
public static ObjectIdentifier SIGNED_DATA_OID
public static ObjectIdentifier ENVELOPED_DATA_OID
public static ObjectIdentifier SIGNED_AND_ENVELOPED_DATA_OID
public static ObjectIdentifier DIGESTED_DATA_OID
public static ObjectIdentifier ENCRYPTED_DATA_OID
public static ObjectIdentifier OLD_SIGNED_DATA_OID
public static ObjectIdentifier OLD_DATA_OID
public static ObjectIdentifier NETSCAPE_CERT_SEQUENCE_OID
public static ObjectIdentifier TIMESTAMP_TOKEN_INFO_OID
public ContentInfo(ObjectIdentifier contentType, DerValue content)
public ContentInfo(byte[] bytes)
public ContentInfo(DerInputStream derin) throws java.io.IOException, ParsingException
java.io.IOExceptionParsingExceptionpublic ContentInfo(DerInputStream derin, boolean oldStyle) throws java.io.IOException, ParsingException
This constructor is used only for backwards compatibility with PKCS#7 blocks that were generated using JDK1.1.x.
derin - the ASN.1 encoding of the content info.oldStyle - flag indicating whether or not the given content info
is encoded according to JDK1.1.x.java.io.IOExceptionParsingExceptionpublic DerValue getContent()
public ObjectIdentifier getContentType()
public byte[] getData()
throws java.io.IOException
java.io.IOExceptionpublic void encode(DerOutputStream out) throws java.io.IOException
java.io.IOExceptionpublic byte[] getContentBytes()
throws java.io.IOException
java.io.IOExceptionpublic java.lang.String toString()
toString in class java.lang.ObjectCopyright © 2020. All Rights Reserved.