Bouncy Castle Cryptography Library 1.60

org.bouncycastle.cms.jcajce
Class JceCMSContentEncryptorBuilder

java.lang.Object
  extended byorg.bouncycastle.cms.jcajce.JceCMSContentEncryptorBuilder

public class JceCMSContentEncryptorBuilder
extends java.lang.Object

Builder for the content encryptor in EnvelopedData - used to encrypt the actual transmitted content.


Constructor Summary
JceCMSContentEncryptorBuilder(org.bouncycastle.asn1.ASN1ObjectIdentifier encryptionOID)
           
JceCMSContentEncryptorBuilder(org.bouncycastle.asn1.ASN1ObjectIdentifier encryptionOID, int keySize)
           
 
Method Summary
 OutputEncryptor build()
           
 JceCMSContentEncryptorBuilder setAlgorithmParameters(java.security.AlgorithmParameters algorithmParameters)
          Provide a set of algorithm parameters for the content encryption cipher to use.
 JceCMSContentEncryptorBuilder setProvider(java.security.Provider provider)
          Set the provider to use for content encryption.
 JceCMSContentEncryptorBuilder setProvider(java.lang.String providerName)
          Set the provider to use for content encryption (by name)
 JceCMSContentEncryptorBuilder setSecureRandom(java.security.SecureRandom random)
          Provide a specified source of randomness to be used for session key and IV/nonce generation.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JceCMSContentEncryptorBuilder

public JceCMSContentEncryptorBuilder(org.bouncycastle.asn1.ASN1ObjectIdentifier encryptionOID)

JceCMSContentEncryptorBuilder

public JceCMSContentEncryptorBuilder(org.bouncycastle.asn1.ASN1ObjectIdentifier encryptionOID,
                                     int keySize)
Method Detail

setProvider

public JceCMSContentEncryptorBuilder setProvider(java.security.Provider provider)
Set the provider to use for content encryption.

Parameters:
provider - the provider object to use for cipher and default parameters creation.
Returns:
the current builder instance.

setProvider

public JceCMSContentEncryptorBuilder setProvider(java.lang.String providerName)
Set the provider to use for content encryption (by name)

Parameters:
providerName - the name of the provider to use for cipher and default parameters creation.
Returns:
the current builder instance.

setSecureRandom

public JceCMSContentEncryptorBuilder setSecureRandom(java.security.SecureRandom random)
Provide a specified source of randomness to be used for session key and IV/nonce generation.

Parameters:
random - the secure random to use.
Returns:
the current builder instance.

setAlgorithmParameters

public JceCMSContentEncryptorBuilder setAlgorithmParameters(java.security.AlgorithmParameters algorithmParameters)
Provide a set of algorithm parameters for the content encryption cipher to use.

Parameters:
algorithmParameters - algorithmParameters for content encryption.
Returns:
the current builder instance.

build

public OutputEncryptor build()
                      throws CMSException
Throws:
CMSException

Bouncy Castle Cryptography Library 1.60