|
Bouncy Castle Cryptography Library 1.85 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.bouncycastle.cms.bc.BcCMSContentEncryptorBuilder
Lightweight builder for the content encryptor used in CMS , and structures — i.e. it encrypts the actual transmitted (or stored) content.
The no-arg build() call generates a fresh content-encryption key
internally, which is the right behaviour for where the
CEK is freshly drawn per message and wrapped per recipient. Callers that
already have a key — e.g. building an blob over
a long-lived locally-stored key (no recipients, no intermediate key wrap)
— should use build(byte[]) or build(KeyParameter)
instead.
| 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. |
OutputEncryptor |
build(org.bouncycastle.crypto.params.KeyParameter encKey)
Build the OutputEncryptor using a pre-generated key in lightweight KeyParameter form. |
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 |
public BcCMSContentEncryptorBuilder(org.bouncycastle.asn1.ASN1ObjectIdentifier encryptionOID)
public BcCMSContentEncryptorBuilder(org.bouncycastle.asn1.ASN1ObjectIdentifier encryptionOID,
int keySize)
| Method Detail |
public BcCMSContentEncryptorBuilder setSecureRandom(java.security.SecureRandom random)
public OutputEncryptor build()
throws CMSException
CMSException
public OutputEncryptor build(byte[] rawEncKey)
throws CMSException
rawEncKey - a raw byte encoding of the key to be used for encryption.
CMSException
public OutputEncryptor build(org.bouncycastle.crypto.params.KeyParameter encKey)
throws CMSException
KeyParameter form. The lightweight peer of
; useful when the
caller already holds a (e.g. derived via
or returned by another BC lightweight key
agreement) and would otherwise round-trip the key through
for no reason.
encKey - the pre-generated key to use for content encryption.
CMSException
|
Bouncy Castle Cryptography Library 1.85 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||