Class BcPKCS12MacCalculatorBuilder
java.lang.Object
org.bouncycastle.pkcs.bc.BcPKCS12MacCalculatorBuilder
- All Implemented Interfaces:
PKCS12MacCalculatorBuilder
Lightweight 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.
-
Constructor Summary
ConstructorsConstructorDescriptionDefault constructor — produces a SHA-1 based MAC builder.BcPKCS12MacCalculatorBuilder(org.bouncycastle.crypto.ExtendedDigest digest, org.bouncycastle.asn1.x509.AlgorithmIdentifier algorithmIdentifier) Construct a MAC builder backed by a specific digest. -
Method Summary
Modifier and TypeMethodDescriptionbuild(char[] password) org.bouncycastle.asn1.x509.AlgorithmIdentifiersetIterationCount(int iterationCount) Override the iteration count used by the PKCS#12 key derivation.
-
Constructor Details
-
BcPKCS12MacCalculatorBuilder
public BcPKCS12MacCalculatorBuilder()Default constructor — produces a SHA-1 based MAC builder. -
BcPKCS12MacCalculatorBuilder
public BcPKCS12MacCalculatorBuilder(org.bouncycastle.crypto.ExtendedDigest digest, org.bouncycastle.asn1.x509.AlgorithmIdentifier algorithmIdentifier) Construct a MAC builder backed by a specific digest.- Parameters:
digest- the lightweight digest implementation to drive the HMAC.algorithmIdentifier- the algorithm identifier describingdigest.
-
-
Method Details
-
setIterationCount
Override the iteration count used by the PKCS#12 key derivation. Defaults to 1024.- Parameters:
iterationCount- the iteration count.- Returns:
- this builder.
-
getDigestAlgorithmIdentifier
public org.bouncycastle.asn1.x509.AlgorithmIdentifier getDigestAlgorithmIdentifier()- Specified by:
getDigestAlgorithmIdentifierin interfacePKCS12MacCalculatorBuilder
-
build
- Specified by:
buildin interfacePKCS12MacCalculatorBuilder
-