org.bouncycastle.pkcs.jcajce
Class JcePKCS12MacCalculatorBuilder
java.lang.Object
org.bouncycastle.pkcs.jcajce.JcePKCS12MacCalculatorBuilder
- All Implemented Interfaces:
- PKCS12MacCalculatorBuilder
- public class JcePKCS12MacCalculatorBuilder
- extends java.lang.Object
- implements 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.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
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.
setProvider
public JcePKCS12MacCalculatorBuilder setProvider(java.security.Provider provider)
setProvider
public JcePKCS12MacCalculatorBuilder setProvider(java.lang.String providerName)
setIterationCount
public JcePKCS12MacCalculatorBuilder setIterationCount(int iterationCount)
getDigestAlgorithmIdentifier
public org.bouncycastle.asn1.x509.AlgorithmIdentifier getDigestAlgorithmIdentifier()
- Specified by:
getDigestAlgorithmIdentifier in interface PKCS12MacCalculatorBuilder
build
public MacCalculator build(char[] password)
throws OperatorCreationException
- Specified by:
build in interface PKCS12MacCalculatorBuilder
- Throws:
OperatorCreationException