public class JceCMSContentEncryptorBuilder extends Object
Constructor and Description |
---|
JceCMSContentEncryptorBuilder(AlgorithmIdentifier encryptionAlgId)
Constructor for a content encryptor builder based on an algorithm identifier and its contained parameters.
|
JceCMSContentEncryptorBuilder(ASN1ObjectIdentifier encryptionOID) |
JceCMSContentEncryptorBuilder(ASN1ObjectIdentifier encryptionOID,
int keySize) |
Modifier and Type | Method and Description |
---|---|
OutputEncryptor |
build() |
JceCMSContentEncryptorBuilder |
setAlgorithmParameters(AlgorithmParameters algorithmParameters)
Provide a set of algorithm parameters for the content encryption cipher to use.
|
JceCMSContentEncryptorBuilder |
setProvider(Provider provider)
Set the provider to use for content encryption.
|
JceCMSContentEncryptorBuilder |
setProvider(String providerName)
Set the provider to use for content encryption (by name)
|
JceCMSContentEncryptorBuilder |
setSecureRandom(SecureRandom random)
Provide a specified source of randomness to be used for session key and IV/nonce generation.
|
public JceCMSContentEncryptorBuilder(ASN1ObjectIdentifier encryptionOID)
public JceCMSContentEncryptorBuilder(ASN1ObjectIdentifier encryptionOID, int keySize)
public JceCMSContentEncryptorBuilder(AlgorithmIdentifier encryptionAlgId)
encryptionAlgId
- the full algorithm identifier for the encryption.public JceCMSContentEncryptorBuilder setProvider(Provider provider)
provider
- the provider object to use for cipher and default parameters creation.public JceCMSContentEncryptorBuilder setProvider(String providerName)
providerName
- the name of the provider to use for cipher and default parameters creation.public JceCMSContentEncryptorBuilder setSecureRandom(SecureRandom random)
random
- the secure random to use.public JceCMSContentEncryptorBuilder setAlgorithmParameters(AlgorithmParameters algorithmParameters)
algorithmParameters
- algorithmParameters for content encryption.public OutputEncryptor build() throws CMSException
CMSException
Copyright © 2021 BouncyCastle.org. All rights reserved.