Bouncy Castle Cryptography Library 1.84

org.bouncycastle.cms.bc
Class BcCMSContentEncryptorBuilder

java.lang.Object
  extended byorg.bouncycastle.cms.bc.BcCMSContentEncryptorBuilder

public class BcCMSContentEncryptorBuilder
extends java.lang.Object


Constructor Summary
BcCMSContentEncryptorBuilder(org.bouncycastle.asn1.ASN1ObjectIdentifier encryptionOID)
           
BcCMSContentEncryptorBuilder(org.bouncycastle.asn1.ASN1ObjectIdentifier encryptionOID, int keySize)
           
 
Method Summary
 OutputEncryptor build()
          Build the OutputEncryptor with an internally generated key.
 OutputEncryptor build(byte[] rawEncKey)
          Build the OutputEncryptor using a pre-generated key.
 BcCMSContentEncryptorBuilder setSecureRandom(java.security.SecureRandom random)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BcCMSContentEncryptorBuilder

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

BcCMSContentEncryptorBuilder

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

setSecureRandom

public BcCMSContentEncryptorBuilder setSecureRandom(java.security.SecureRandom random)

build

public OutputEncryptor build()
                      throws CMSException
Build the OutputEncryptor with an internally generated key.

Returns:
an OutputEncryptor configured to use an internal key.
Throws:
CMSException

build

public OutputEncryptor build(byte[] rawEncKey)
                      throws CMSException
Build the OutputEncryptor using a pre-generated key.

Parameters:
rawEncKey - a raw byte encoding of the key to be used for encryption.
Returns:
an OutputEncryptor configured to use rawEncKey.
Throws:
CMSException

Bouncy Castle Cryptography Library 1.84