Package org.bouncycastle.cms.jcajce
Class JceCMSMacCalculatorBuilder
- java.lang.Object
-
- org.bouncycastle.cms.jcajce.JceCMSMacCalculatorBuilder
-
public class JceCMSMacCalculatorBuilder extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description JceCMSMacCalculatorBuilder(org.bouncycastle.asn1.ASN1ObjectIdentifier macOID)
JceCMSMacCalculatorBuilder(org.bouncycastle.asn1.ASN1ObjectIdentifier macOID, int keySize)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description MacCalculator
build()
JceCMSMacCalculatorBuilder
setAlgorithmParameters(java.security.AlgorithmParameters algorithmParameters)
Provide a set of algorithm parameters for the content MAC calculator to use.JceCMSMacCalculatorBuilder
setProvider(java.lang.String providerName)
Set the provider to use for content encryption (by name)JceCMSMacCalculatorBuilder
setProvider(java.security.Provider provider)
Set the provider to use for content encryption.JceCMSMacCalculatorBuilder
setSecureRandom(java.security.SecureRandom random)
Provide a specified source of randomness to be used for session key and IV/nonce generation.
-
-
-
Method Detail
-
setProvider
public JceCMSMacCalculatorBuilder setProvider(java.security.Provider provider)
Set the provider to use for content encryption.- Parameters:
provider
- the provider object to use for MAC and default parameters creation.- Returns:
- the current builder instance.
-
setProvider
public JceCMSMacCalculatorBuilder 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 MAC and default parameters creation.- Returns:
- the current builder instance.
-
setSecureRandom
public JceCMSMacCalculatorBuilder 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 JceCMSMacCalculatorBuilder setAlgorithmParameters(java.security.AlgorithmParameters algorithmParameters)
Provide a set of algorithm parameters for the content MAC calculator to use.- Parameters:
algorithmParameters
- algorithmParameters for MAC initialisation.- Returns:
- the current builder instance.
-
build
public MacCalculator build() throws CMSException
- Throws:
CMSException
-
-