public class PKCS12PfxPdu extends Object
| Constructor and Description |
|---|
PKCS12PfxPdu(byte[] pfx) |
PKCS12PfxPdu(Pfx pfx) |
| Modifier and Type | Method and Description |
|---|---|
ContentInfo[] |
getContentInfos()
Return the content infos in the AuthenticatedSafe contained in this Pfx.
|
byte[] |
getEncoded() |
byte[] |
getEncoded(String encoding)
Return a Pfx with the outer wrapper encoded as asked for.
|
AlgorithmIdentifier |
getMacAlgorithmID()
Return the algorithm identifier describing the MAC algorithm
|
boolean |
hasMac()
Return whether or not there is MAC attached to this file.
|
boolean |
isMacValid(PKCS12MacCalculatorBuilderProvider macCalcProviderBuilder,
char[] password)
Verify the MacData attached to the PFX is consistent with what is expected.
|
Pfx |
toASN1Structure()
Return the underlying ASN.1 object.
|
public PKCS12PfxPdu(Pfx pfx)
public PKCS12PfxPdu(byte[] pfx)
throws IOException
IOExceptionpublic ContentInfo[] getContentInfos()
public boolean hasMac()
public AlgorithmIdentifier getMacAlgorithmID()
public boolean isMacValid(PKCS12MacCalculatorBuilderProvider macCalcProviderBuilder, char[] password) throws PKCSException
macCalcProviderBuilder - provider builder for the calculator for the MACpassword - password to usePKCSException - if there is a problem evaluating the MAC.IllegalStateException - if no MAC is actually presentpublic Pfx toASN1Structure()
public byte[] getEncoded()
throws IOException
IOExceptionpublic byte[] getEncoded(String encoding) throws IOException
getEncoded(ASN1Encoding.DL)
encoding - encoding style (ASN1Encoding.DER, ASN1Encoding.DL, ASN1Encoding.BER)IOExceptionCopyright © 2015–2019 The veraPDF Consortium. All rights reserved.