Package org.bouncycastle.cms.bc
Class BcCMSContentEncryptorBuilder
- java.lang.Object
-
- org.bouncycastle.cms.bc.BcCMSContentEncryptorBuilder
-
public class BcCMSContentEncryptorBuilder extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description BcCMSContentEncryptorBuilder(org.bouncycastle.asn1.ASN1ObjectIdentifier encryptionOID)BcCMSContentEncryptorBuilder(org.bouncycastle.asn1.ASN1ObjectIdentifier encryptionOID, int keySize)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description OutputEncryptorbuild()Build the OutputEncryptor with an internally generated key.OutputEncryptorbuild(byte[] rawEncKey)Build the OutputEncryptor using a pre-generated key.BcCMSContentEncryptorBuildersetSecureRandom(java.security.SecureRandom random)
-
-
-
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
-
-