Class Pkcs12Helper
java.lang.Object
paccor.crypto.Pkcs12Helper
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic final X509CredentialloadPkcs12Key(String filename) Preferred API for loading a single private key (and optional certificate) from a PKCS#12 file.static final X509CredentialloadPkcs12Key(String filename, char[] password) Preferred API for loading a single private key (and optional certificate) from a PKCS#12 file.
-
Constructor Details
-
Pkcs12Helper
public Pkcs12Helper()
-
-
Method Details
-
loadPkcs12Key
Preferred API for loading a single private key (and optional certificate) from a PKCS#12 file. Prompts for password.- Parameters:
filename- File name including the path.- Returns:
- X509Credential
- Throws:
IOException
-
loadPkcs12Key
public static final X509Credential loadPkcs12Key(String filename, char[] password) throws IOException Preferred API for loading a single private key (and optional certificate) from a PKCS#12 file. Uses the provided password when present, otherwise prompts interactively.- Parameters:
filename- File name including the path.password- PKCS#12 password, or null to prompt.- Returns:
- X509Credential
- Throws:
IOException
-