org.bouncycastle.cms

Class CMSEnvelopedData

public class CMSEnvelopedData extends Object

containing class for an CMS Enveloped Data object
Constructor Summary
CMSEnvelopedData(byte[] envelopedData)
CMSEnvelopedData(InputStream envelopedData)
CMSEnvelopedData(ContentInfo contentInfo)
Method Summary
byte[]getEncoded()
return the ASN.1 encoded representation of this object.
AlgorithmParametersgetEncryptionAlgorithmParameters(String provider)
Return an AlgorithmParameters object giving the encryption parameters used to encrypt the message content.
StringgetEncryptionAlgOID()
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.
RecipientInformationStoregetRecipientInfos()
return a store of the intended recipients for this message
AttributeTablegetUnprotectedAttributes()
return a table of the unprotected attributes indexed by the OID of the attribute.

Constructor Detail

CMSEnvelopedData

public CMSEnvelopedData(byte[] envelopedData)

CMSEnvelopedData

public CMSEnvelopedData(InputStream envelopedData)

CMSEnvelopedData

public CMSEnvelopedData(ContentInfo contentInfo)

Method Detail

getEncoded

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

getEncryptionAlgorithmParameters

public AlgorithmParameters getEncryptionAlgorithmParameters(String provider)
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. NoSuchProviderException if the provider cannot be found.

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.

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.