Class JcePKCS12MacCalculatorBuilder
java.lang.Object
org.bouncycastle.pkcs.jcajce.JcePKCS12MacCalculatorBuilder
- All Implemented Interfaces:
PKCS12MacCalculatorBuilder
JCA-based builder for the password-based MAC calculator used to protect the integrity of a
PKCS#12 PFX (RFC 7292). Defaults to SHA-1 with an iteration count of 1024. For RFC 9579
PBMAC1 protection use
JcePBMac1CalculatorBuilder instead.-
Constructor Summary
ConstructorsConstructorDescriptionDefault constructor — uses SHA-1 as the MAC digest.JcePKCS12MacCalculatorBuilder(org.bouncycastle.asn1.ASN1ObjectIdentifier hashAlgorithm) Construct a builder using an explicit hash algorithm. -
Method Summary
Modifier and TypeMethodDescriptionbuild(char[] password) org.bouncycastle.asn1.x509.AlgorithmIdentifiersetIterationCount(int iterationCount) setProvider(String providerName) setProvider(Provider provider)
-
Constructor Details
-
JcePKCS12MacCalculatorBuilder
public JcePKCS12MacCalculatorBuilder()Default constructor — uses SHA-1 as the MAC digest. -
JcePKCS12MacCalculatorBuilder
public JcePKCS12MacCalculatorBuilder(org.bouncycastle.asn1.ASN1ObjectIdentifier hashAlgorithm) Construct a builder using an explicit hash algorithm.- Parameters:
hashAlgorithm- the OID of the digest used by the HmacPBE MAC.
-
-
Method Details
-
setProvider
-
setProvider
-
setIterationCount
-
getDigestAlgorithmIdentifier
public org.bouncycastle.asn1.x509.AlgorithmIdentifier getDigestAlgorithmIdentifier()- Specified by:
getDigestAlgorithmIdentifierin interfacePKCS12MacCalculatorBuilder
-
build
- Specified by:
buildin interfacePKCS12MacCalculatorBuilder- Throws:
OperatorCreationException
-