Package org.bouncycastle.cert.crmf
Class PKMACBuilder
- java.lang.Object
-
- org.bouncycastle.cert.crmf.PKMACBuilder
-
- All Implemented Interfaces:
org.bouncycastle.operator.PBEMacCalculatorProvider
public class PKMACBuilder extends java.lang.Object implements org.bouncycastle.operator.PBEMacCalculatorProvider
-
-
Constructor Summary
Constructors Constructor Description PKMACBuilder(PKMACValuesCalculator calculator)
PKMACBuilder(PKMACValuesCalculator calculator, int maxIterations)
Create a PKMAC builder enforcing a ceiling on the maximum iteration count.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.bouncycastle.operator.MacCalculator
build(char[] password)
org.bouncycastle.operator.MacCalculator
get(org.bouncycastle.asn1.x509.AlgorithmIdentifier algorithm, char[] password)
PKMACBuilder
setIterationCount(int iterationCount)
PKMACBuilder
setParameters(org.bouncycastle.asn1.cmp.PBMParameter parameters)
PKMACBuilder
setSaltLength(int saltLength)
Set the salt length in octets.PKMACBuilder
setSecureRandom(java.security.SecureRandom random)
-
-
-
Constructor Detail
-
PKMACBuilder
public PKMACBuilder(PKMACValuesCalculator calculator)
-
PKMACBuilder
public PKMACBuilder(PKMACValuesCalculator calculator, int maxIterations)
Create a PKMAC builder enforcing a ceiling on the maximum iteration count.- Parameters:
calculator
- supporting calculatormaxIterations
- max allowable value for iteration count.
-
-
Method Detail
-
setSaltLength
public PKMACBuilder setSaltLength(int saltLength)
Set the salt length in octets.- Parameters:
saltLength
- length in octets of the salt to be generated.- Returns:
- the generator
-
setIterationCount
public PKMACBuilder setIterationCount(int iterationCount)
-
setSecureRandom
public PKMACBuilder setSecureRandom(java.security.SecureRandom random)
-
setParameters
public PKMACBuilder setParameters(org.bouncycastle.asn1.cmp.PBMParameter parameters)
-
get
public org.bouncycastle.operator.MacCalculator get(org.bouncycastle.asn1.x509.AlgorithmIdentifier algorithm, char[] password) throws org.bouncycastle.operator.OperatorCreationException
- Specified by:
get
in interfaceorg.bouncycastle.operator.PBEMacCalculatorProvider
- Throws:
org.bouncycastle.operator.OperatorCreationException
-
build
public org.bouncycastle.operator.MacCalculator build(char[] password) throws CRMFException
- Throws:
CRMFException
-
-