com.ibm.security12.sun.security.pkcs
Class ContentInfo

java.lang.Object
  |
  +--com.ibm.security12.sun.security.pkcs.ContentInfo

public class ContentInfo
extends Object

A ContentInfo type, as defined in PKCS#7.

Version:
1.17
Author:
Benjamin Renaud

Field Summary
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
          The ASN.1 systax for the Netscape Certificate Sequence data type is defined here.
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
           
 
Constructor Summary
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)
           
 
Method Summary
 void encode(DerOutputStream out)
           
 DerValue getContent()
           
 byte[] getContentBytes()
          Returns a byte array representation of the data held in the content field.
 byte[] getData()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

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

OLD_SIGNED_DATA_OID

public static final ObjectIdentifier OLD_SIGNED_DATA_OID

OLD_DATA_OID

public static final ObjectIdentifier OLD_DATA_OID

NETSCAPE_CERT_SEQUENCE_OID

public static final ObjectIdentifier NETSCAPE_CERT_SEQUENCE_OID
The ASN.1 systax for the Netscape Certificate Sequence data type is defined here.
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 IOException,
                   sun.security.pkcs.ParsingException
Parses a PKCS#7 content info.

ContentInfo

public ContentInfo(DerInputStream derin,
                   boolean oldStyle)
            throws IOException,
                   sun.security.pkcs.ParsingException
Parses a PKCS#7 content info.

This constructor is used only for backwards compatibility with PKCS#7 blocks that were generated using JDK1.1.x.

Parameters:
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.
Method Detail

getContent

public DerValue getContent()

getData

public byte[] getData()
               throws IOException

encode

public void encode(DerOutputStream out)
            throws IOException

getContentBytes

public byte[] getContentBytes()
                       throws IOException
Returns a byte array representation of the data held in the content field.

toString

public String toString()
Overrides:
toString in class Object