org.bouncycastle.cms

Class CMSEnvelopedData

Known Direct Subclasses:
SMIMEEnveloped

public class CMSEnvelopedData
extends java.lang.Object

containing class for an CMS Enveloped Data object

Constructor Summary

CMSEnvelopedData(ContentInfo contentInfo)
CMSEnvelopedData(InputStream envelopedData)
CMSEnvelopedData(byte[] envelopedData)

Method Summary

byte[]
getEncoded()
return the ASN.1 encoded representation of this object.
String
getEncryptionAlgOID()
return the object identifier for the content encryption algorithm.
byte[]
getEncryptionAlgParams()
return the ASN.1 encoded encryption algorithm parameters, or null if there aren't any.
AlgorithmParameters
getEncryptionAlgorithmParameters(String provider)
Return an AlgorithmParameters object giving the encryption parameters used to encrypt the message content.
RecipientInformationStore
getRecipientInfos()
return a store of the intended recipients for this message
AttributeTable
getUnprotectedAttributes()
return a table of the unprotected attributes indexed by the OID of the attribute.

Constructor Details

CMSEnvelopedData

public CMSEnvelopedData(ContentInfo contentInfo)
            throws CMSException

CMSEnvelopedData

public CMSEnvelopedData(InputStream envelopedData)
            throws CMSException

CMSEnvelopedData

public CMSEnvelopedData(byte[] envelopedData)
            throws CMSException

Method Details

getEncoded

public byte[] getEncoded()
            throws IOException
return the ASN.1 encoded representation of this object.

getEncryptionAlgOID

public String getEncryptionAlgOID()
return the object identifier for the content encryption algorithm.

getEncryptionAlgParams

public byte[] getEncryptionAlgParams()
return the ASN.1 encoded encryption algorithm parameters, or null if there aren't any.

getEncryptionAlgorithmParameters

public AlgorithmParameters getEncryptionAlgorithmParameters(String provider)
            throws CMSException,
                   NoSuchProviderException
Return an AlgorithmParameters object giving the encryption parameters used to encrypt the message content.
Parameters:
provider - the provider to generate the parameters for.
Returns:
the parameters object, null if there is not one.
Throws:
CMSException - if the algorithm cannot be found, or the parameters can't be parsed.

getRecipientInfos

public RecipientInformationStore getRecipientInfos()
return a store of the intended recipients for this message

getUnprotectedAttributes

public AttributeTable getUnprotectedAttributes()
return a table of the unprotected attributes indexed by the OID of the attribute.