Bouncy Castle Cryptography Library 1.44

org.bouncycastle.cms
Class KeyAgreeRecipientInformation

java.lang.Object
  extended by org.bouncycastle.cms.RecipientInformation
      extended by org.bouncycastle.cms.KeyAgreeRecipientInformation

public class KeyAgreeRecipientInformation
extends RecipientInformation

the RecipientInfo class for a recipient who has been sent a message encrypted using key agreement.


Field Summary
 
Fields inherited from class org.bouncycastle.cms.RecipientInformation
data, encAlg, keyEncAlg, macAlg, rid
 
Constructor Summary
KeyAgreeRecipientInformation(org.bouncycastle.asn1.cms.KeyAgreeRecipientInfo info, org.bouncycastle.asn1.x509.AlgorithmIdentifier encAlg, org.bouncycastle.asn1.x509.AlgorithmIdentifier macAlg, java.io.InputStream data)
           
KeyAgreeRecipientInformation(org.bouncycastle.asn1.cms.KeyAgreeRecipientInfo info, org.bouncycastle.asn1.x509.AlgorithmIdentifier encAlg, java.io.InputStream data)
           
 
Method Summary
 CMSTypedStream getContentStream(java.security.Key key, java.security.Provider prov)
           
 CMSTypedStream getContentStream(java.security.Key key, java.lang.String prov)
          decrypt the content and return it
protected  java.security.Key getSessionKey(java.security.Key receiverPrivateKey, java.security.Provider prov)
           
 
Methods inherited from class org.bouncycastle.cms.RecipientInformation
getContent, getContent, getContentFromSessionKey, getKeyEncryptionAlgOID, getKeyEncryptionAlgorithmParameters, getKeyEncryptionAlgorithmParameters, getKeyEncryptionAlgParams, getMac, getRID
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

KeyAgreeRecipientInformation

public KeyAgreeRecipientInformation(org.bouncycastle.asn1.cms.KeyAgreeRecipientInfo info,
                                    org.bouncycastle.asn1.x509.AlgorithmIdentifier encAlg,
                                    java.io.InputStream data)

KeyAgreeRecipientInformation

public KeyAgreeRecipientInformation(org.bouncycastle.asn1.cms.KeyAgreeRecipientInfo info,
                                    org.bouncycastle.asn1.x509.AlgorithmIdentifier encAlg,
                                    org.bouncycastle.asn1.x509.AlgorithmIdentifier macAlg,
                                    java.io.InputStream data)
Method Detail

getSessionKey

protected java.security.Key getSessionKey(java.security.Key receiverPrivateKey,
                                          java.security.Provider prov)
                                   throws CMSException
Throws:
CMSException

getContentStream

public CMSTypedStream getContentStream(java.security.Key key,
                                       java.lang.String prov)
                                throws CMSException,
                                       java.security.NoSuchProviderException
decrypt the content and return it

Overrides:
getContentStream in class RecipientInformation
Throws:
CMSException
java.security.NoSuchProviderException

getContentStream

public CMSTypedStream getContentStream(java.security.Key key,
                                       java.security.Provider prov)
                                throws CMSException
Specified by:
getContentStream in class RecipientInformation
Throws:
CMSException

Bouncy Castle Cryptography Library 1.44