public abstract class RecipientInformation extends Object
Modifier and Type | Field and Description |
---|---|
protected AlgorithmIdentifier |
keyEncAlg |
protected AlgorithmIdentifier |
messageAlgorithm |
protected RecipientId |
rid |
Modifier and Type | Method and Description |
---|---|
byte[] |
getContent(Key key,
Provider provider)
Deprecated.
use getContent(Recipient)
|
byte[] |
getContent(Key key,
String provider)
Deprecated.
use getContent(Recipient)
|
byte[] |
getContent(Recipient recipient)
Return the decrypted/encapsulated content in the EnvelopedData after recovering the content
encryption/MAC key using the passed in Recipient.
|
byte[] |
getContentDigest()
Return the content digest calculated during the read of the content if one has been generated.
|
protected CMSTypedStream |
getContentFromSessionKey(Key sKey,
Provider provider) |
abstract CMSTypedStream |
getContentStream(Key key,
Provider provider)
Deprecated.
use getContentStream(Recipient) method
|
CMSTypedStream |
getContentStream(Key key,
String provider)
Deprecated.
use getContentStream(Recipient) method
|
CMSTypedStream |
getContentStream(Recipient recipient)
Return a CMSTypedStream representing the content in the EnvelopedData after recovering the content
encryption/MAC key using the passed in Recipient.
|
String |
getKeyEncryptionAlgOID()
return the object identifier for the key encryption algorithm.
|
AlgorithmParameters |
getKeyEncryptionAlgorithmParameters(Provider provider)
Return an AlgorithmParameters object giving the encryption parameters
used to encrypt the key this recipient holds.
|
AlgorithmParameters |
getKeyEncryptionAlgorithmParameters(String provider)
Return an AlgorithmParameters object giving the encryption parameters
used to encrypt the key this recipient holds.
|
byte[] |
getKeyEncryptionAlgParams()
return the ASN.1 encoded key encryption algorithm parameters, or null if
there aren't any.
|
byte[] |
getMac()
Return the MAC calculated for the recipient.
|
protected abstract RecipientOperator |
getRecipientOperator(Recipient recipient) |
RecipientId |
getRID() |
protected RecipientId rid
protected AlgorithmIdentifier keyEncAlg
protected AlgorithmIdentifier messageAlgorithm
public RecipientId getRID()
public String getKeyEncryptionAlgOID()
public byte[] getKeyEncryptionAlgParams()
public AlgorithmParameters getKeyEncryptionAlgorithmParameters(String provider) throws CMSException, NoSuchProviderException
provider
- the provider to generate the parameters for.CMSException
- if the algorithm cannot be found, or the parameters can't be parsed.NoSuchProviderException
- if the provider cannot be found.public AlgorithmParameters getKeyEncryptionAlgorithmParameters(Provider provider) throws CMSException
provider
- the provider to generate the parameters for.CMSException
- if the algorithm cannot be found, or the parameters can't be parsed.protected CMSTypedStream getContentFromSessionKey(Key sKey, Provider provider) throws CMSException
CMSException
public byte[] getContent(Key key, String provider) throws CMSException, NoSuchProviderException
CMSException
NoSuchProviderException
public byte[] getContent(Key key, Provider provider) throws CMSException
CMSException
public byte[] getContentDigest()
public byte[] getMac()
public byte[] getContent(Recipient recipient) throws CMSException
recipient
- recipient object to use to recover content encryption keyCMSException
- if the content-encryption/MAC key cannot be recovered.public CMSTypedStream getContentStream(Key key, String provider) throws CMSException, NoSuchProviderException
CMSException
NoSuchProviderException
public abstract CMSTypedStream getContentStream(Key key, Provider provider) throws CMSException
CMSException
public CMSTypedStream getContentStream(Recipient recipient) throws CMSException, IOException
recipient
- recipient object to use to recover content encryption keyCMSException
- if the content-encryption/MAC key cannot be recovered.IOException
protected abstract RecipientOperator getRecipientOperator(Recipient recipient) throws CMSException, IOException
CMSException
IOException
Copyright © 2015. All rights reserved.