Class Pkcs12Helper

java.lang.Object
paccor.crypto.Pkcs12Helper

public class Pkcs12Helper extends Object
  • Constructor Details

    • Pkcs12Helper

      public Pkcs12Helper()
  • Method Details

    • loadPkcs12Key

      public static final X509Credential loadPkcs12Key(String filename) throws IOException
      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