Package org.bouncycastle.pkcs.bc
Class BcPKCS12MacCalculatorBuilder
- java.lang.Object
-
- org.bouncycastle.pkcs.bc.BcPKCS12MacCalculatorBuilder
-
- All Implemented Interfaces:
PKCS12MacCalculatorBuilder
public class BcPKCS12MacCalculatorBuilder extends java.lang.Object implements 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
Constructors Constructor Description BcPKCS12MacCalculatorBuilder()Default 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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description MacCalculatorbuild(char[] password)org.bouncycastle.asn1.x509.AlgorithmIdentifiergetDigestAlgorithmIdentifier()BcPKCS12MacCalculatorBuildersetIterationCount(int iterationCount)Override the iteration count used by the PKCS#12 key derivation.
-
-
-
Constructor Detail
-
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 Detail
-
setIterationCount
public BcPKCS12MacCalculatorBuilder setIterationCount(int iterationCount)
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
public MacCalculator build(char[] password)
- Specified by:
buildin interfacePKCS12MacCalculatorBuilder
-
-