Bouncy Castle Cryptography Library 1.59

org.bouncycastle.cms.jcajce
Class JceKeyAgreeRecipient

java.lang.Object
  extended byorg.bouncycastle.cms.jcajce.JceKeyAgreeRecipient
All Implemented Interfaces:
KeyAgreeRecipient, Recipient
Direct Known Subclasses:
JceKeyAgreeAuthenticatedRecipient, JceKeyAgreeEnvelopedRecipient

public abstract class JceKeyAgreeRecipient
extends java.lang.Object
implements KeyAgreeRecipient


Field Summary
protected  EnvelopedDataHelper contentHelper
           
protected  EnvelopedDataHelper helper
           
 
Constructor Summary
JceKeyAgreeRecipient(java.security.PrivateKey recipientKey)
           
 
Method Summary
protected  java.security.Key extractSecretKey(org.bouncycastle.asn1.x509.AlgorithmIdentifier keyEncryptionAlgorithm, org.bouncycastle.asn1.x509.AlgorithmIdentifier contentEncryptionAlgorithm, org.bouncycastle.asn1.x509.SubjectPublicKeyInfo senderKey, org.bouncycastle.asn1.ASN1OctetString userKeyingMaterial, byte[] encryptedContentEncryptionKey)
           
 org.bouncycastle.asn1.x509.AlgorithmIdentifier getPrivateKeyAlgorithmIdentifier()
           
 JceKeyAgreeRecipient setContentProvider(java.security.Provider provider)
          Set the provider to use for content processing.
 JceKeyAgreeRecipient setContentProvider(java.lang.String providerName)
          Set the provider to use for content processing.
 JceKeyAgreeRecipient setProvider(java.security.Provider provider)
          Set the provider to use for key recovery and content processing.
 JceKeyAgreeRecipient setProvider(java.lang.String providerName)
          Set the provider to use for key recovery and content processing.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.bouncycastle.cms.KeyAgreeRecipient
getRecipientOperator
 

Field Detail

helper

protected EnvelopedDataHelper helper

contentHelper

protected EnvelopedDataHelper contentHelper
Constructor Detail

JceKeyAgreeRecipient

public JceKeyAgreeRecipient(java.security.PrivateKey recipientKey)
Method Detail

setProvider

public JceKeyAgreeRecipient setProvider(java.security.Provider provider)
Set the provider to use for key recovery and content processing.

Parameters:
provider - provider to use.
Returns:
this recipient.

setProvider

public JceKeyAgreeRecipient setProvider(java.lang.String providerName)
Set the provider to use for key recovery and content processing.

Parameters:
providerName - the name of the provider to use.
Returns:
this recipient.

setContentProvider

public JceKeyAgreeRecipient setContentProvider(java.security.Provider provider)
Set the provider to use for content processing. If providerName is null a "no provider" search will be used to satisfy getInstance calls.

Parameters:
provider - the provider to use.
Returns:
this recipient.

setContentProvider

public JceKeyAgreeRecipient setContentProvider(java.lang.String providerName)
Set the provider to use for content processing. If providerName is null a "no provider" search will be used to satisfy getInstance calls.

Parameters:
providerName - the name of the provider to use.
Returns:
this recipient.

extractSecretKey

protected java.security.Key extractSecretKey(org.bouncycastle.asn1.x509.AlgorithmIdentifier keyEncryptionAlgorithm,
                                             org.bouncycastle.asn1.x509.AlgorithmIdentifier contentEncryptionAlgorithm,
                                             org.bouncycastle.asn1.x509.SubjectPublicKeyInfo senderKey,
                                             org.bouncycastle.asn1.ASN1OctetString userKeyingMaterial,
                                             byte[] encryptedContentEncryptionKey)
                                      throws CMSException
Throws:
CMSException

getPrivateKeyAlgorithmIdentifier

public org.bouncycastle.asn1.x509.AlgorithmIdentifier getPrivateKeyAlgorithmIdentifier()
Specified by:
getPrivateKeyAlgorithmIdentifier in interface KeyAgreeRecipient

Bouncy Castle Cryptography Library 1.59