org.bouncycastle.cms

Class RecipientInformation

Known Direct Subclasses:
KeyTransRecipientInformation, KEKRecipientInformation

public abstract class RecipientInformation
extends java.lang.Object

Field Summary

protected EncryptedContentInfo
data
protected AlgorithmIdentifier
keyEncAlg
protected RecipientId
rid

Constructor Summary

RecipientInformation(AlgorithmIdentifier keyEncAlg, EncryptedContentInfo data)

Method Summary

byte[]
getContent(Key key, String provider)
protected byte[]
getContentFromSessionKey(Key sKey, String provider)
String
getKeyEncryptionAlgOID()
return the object identifier for the key encryption algorithm.
byte[]
getKeyEncryptionAlgParams()
return the ASN.1 encoded key encryption algorithm parameters, or null if there aren't any.
AlgorithmParameters
getKeyEncryptionAlgorithmParameters(String provider)
Return an AlgorithmParameters object giving the encryption parameters used to encrypt the key this recipient holds.
RecipientId
getRID()

Field Details

data

protected EncryptedContentInfo data


keyEncAlg

protected AlgorithmIdentifier keyEncAlg


rid

protected RecipientId rid

Constructor Details

RecipientInformation

protected RecipientInformation(AlgorithmIdentifier keyEncAlg,
                               EncryptedContentInfo data)

Method Details

getContent

public byte[] getContent(Key key,
                         String provider)
            throws CMSException,
                   NoSuchProviderException


getContentFromSessionKey

protected byte[] getContentFromSessionKey(Key sKey,
                                          String provider)
            throws CMSException,
                   NoSuchProviderException


getKeyEncryptionAlgOID

public String getKeyEncryptionAlgOID()
return the object identifier for the key encryption algorithm.


getKeyEncryptionAlgParams

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


getKeyEncryptionAlgorithmParameters

public AlgorithmParameters getKeyEncryptionAlgorithmParameters(String provider)
            throws CMSException,
                   NoSuchProviderException
Return an AlgorithmParameters object giving the encryption parameters used to encrypt the key this recipient holds.

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.


getRID

public RecipientId getRID()