org.bouncycastle.cms

Class RecipientInformation

public abstract class RecipientInformation extends Object

Field Summary
protected InputStream_data
protected AlgorithmIdentifier_encAlg
protected AlgorithmIdentifier_keyEncAlg
protected RecipientId_rid
Constructor Summary
protected RecipientInformation(AlgorithmIdentifier encAlg, AlgorithmIdentifier keyEncAlg, InputStream data)
Method Summary
byte[]getContent(Key key, String provider)
protected CMSTypedStreamgetContentFromSessionKey(Key sKey, String provider)
abstract CMSTypedStreamgetContentStream(Key key, String provider)
AlgorithmParametersgetKeyEncryptionAlgorithmParameters(String provider)
Return an AlgorithmParameters object giving the encryption parameters used to encrypt the key this recipient holds.
StringgetKeyEncryptionAlgOID()
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.
RecipientIdgetRID()

Field Detail

_data

protected InputStream _data

_encAlg

protected AlgorithmIdentifier _encAlg

_keyEncAlg

protected AlgorithmIdentifier _keyEncAlg

_rid

protected RecipientId _rid

Constructor Detail

RecipientInformation

protected RecipientInformation(AlgorithmIdentifier encAlg, AlgorithmIdentifier keyEncAlg, InputStream data)

Method Detail

getContent

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

getContentFromSessionKey

protected CMSTypedStream getContentFromSessionKey(Key sKey, String provider)

getContentStream

public abstract CMSTypedStream getContentStream(Key key, String provider)

getKeyEncryptionAlgorithmParameters

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

getKeyEncryptionAlgOID

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

Returns: OID for key encryption algorithm.

getKeyEncryptionAlgParams

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

Returns: ASN.1 encoding of key encryption algorithm parameters.

getRID

public RecipientId getRID()