public class PKCS12Util
extends java.lang.Object
| Constructor and Description |
|---|
PKCS12Util() |
| Modifier and Type | Method and Description |
|---|---|
static byte[] |
convertToDefiniteLength(byte[] berPKCS12File)
Just re-encode the outer layer of the PKCS#12 file to definite length encoding.
|
static byte[] |
convertToDefiniteLength(byte[] berPKCS12File,
char[] passwd,
java.lang.String provider)
Re-encode the PKCS#12 structure to definite length encoding at the inner layer
as well, recomputing the MAC accordingly.
|
static ASN1Encodable |
getContent(ContentInfo contentInfo) |
static byte[] |
getContentOctets(ContentInfo contentInfo) |
static ASN1OctetString |
getEncryptedContent(EncryptedData encryptedData) |
static int |
validateIterationCount(java.math.BigInteger ic) |
public static byte[] convertToDefiniteLength(byte[] berPKCS12File)
throws java.io.IOException
berPKCS12File - - original PKCS#12 filejava.io.IOExceptionpublic static byte[] convertToDefiniteLength(byte[] berPKCS12File,
char[] passwd,
java.lang.String provider)
throws java.io.IOException
berPKCS12File - - original PKCS12 file.provider - - provider to use for MAC calculation.java.io.IOException - on parsing, encoding errors.public static ASN1Encodable getContent(ContentInfo contentInfo) throws java.io.IOException
java.io.IOExceptionpublic static byte[] getContentOctets(ContentInfo contentInfo) throws java.io.IOException
java.io.IOExceptionpublic static ASN1OctetString getEncryptedContent(EncryptedData encryptedData) throws java.io.IOException
java.io.IOExceptionpublic static int validateIterationCount(java.math.BigInteger ic)