Package org.bouncycastle.pkcs.bc
Class BcPKCS12PBMac1CalculatorBuilder
- java.lang.Object
-
- org.bouncycastle.pkcs.bc.BcPKCS12PBMac1CalculatorBuilder
-
- All Implemented Interfaces:
PKCS12MacCalculatorBuilder
public class BcPKCS12PBMac1CalculatorBuilder extends java.lang.Object implements PKCS12MacCalculatorBuilder
LightweightPKCS12MacCalculatorBuilderthat produces a PBMAC1 calculator (RFC 8018 ยง7.1) for use as PKCS#12 PFX integrity protection per RFC 9579. Currently restricted to PBKDF2; RFC 9579 requires the PBKDF2 parameters to carry an explicit key length.
-
-
Constructor Summary
Constructors Constructor Description BcPKCS12PBMac1CalculatorBuilder(org.bouncycastle.asn1.pkcs.PBMAC1Params pbeMacParams)Base constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description MacCalculatorbuild(char[] password)org.bouncycastle.asn1.x509.AlgorithmIdentifiergetDigestAlgorithmIdentifier()
-
-
-
Constructor Detail
-
BcPKCS12PBMac1CalculatorBuilder
public BcPKCS12PBMac1CalculatorBuilder(org.bouncycastle.asn1.pkcs.PBMAC1Params pbeMacParams) throws java.io.IOExceptionBase constructor.- Parameters:
pbeMacParams- the PBMAC1 parameters carrying the key-derivation function and message-authentication scheme.- Throws:
java.io.IOException- if the PBMAC1 parameters omit a key length (required by RFC 9579) or use an unsupported key-derivation function.
-
-
Method Detail
-
getDigestAlgorithmIdentifier
public org.bouncycastle.asn1.x509.AlgorithmIdentifier getDigestAlgorithmIdentifier()
- Specified by:
getDigestAlgorithmIdentifierin interfacePKCS12MacCalculatorBuilder
-
build
public MacCalculator build(char[] password) throws OperatorCreationException
- Specified by:
buildin interfacePKCS12MacCalculatorBuilder- Throws:
OperatorCreationException
-
-