Interface P12Generator

All Known Implementing Classes:
AbstractP12Generator, AESP12Generator, LegacyP12Generator

public interface P12Generator
Provides a simple interface for generating PKCS12 containers.
Author:
Marvin S. Addison
  • Method Summary

    Modifier and Type
    Method
    Description
    org.bouncycastle.pkcs.PKCS12PfxPdu
    generate(char[] password, PrivateKey key, String alias, X509Certificate... certificates)
    Generates a PKCS12 container object that contains the given private key and certificates with the given alias.
    org.bouncycastle.pkcs.PKCS12PfxPdu
    generate(char[] password, PrivateKey key, X509Certificate... certificates)
    Generates a PKCS12 container object that contains the given private key and certificates.
  • Method Details

    • generate

      org.bouncycastle.pkcs.PKCS12PfxPdu generate(char[] password, PrivateKey key, X509Certificate... certificates)
      Generates a PKCS12 container object that contains the given private key and certificates.
      Parameters:
      password - PKCS12 encryption password. This secret is also used to encrypt the inner private key.
      key - Private key.
      certificates - One or more certificates. If more than one certificate is provided, the first is taken as the end-entity certificate.
      Returns:
      Bouncy Castle PKCS12 container object.
    • generate

      org.bouncycastle.pkcs.PKCS12PfxPdu generate(char[] password, PrivateKey key, String alias, X509Certificate... certificates)
      Generates a PKCS12 container object that contains the given private key and certificates with the given alias.
      Parameters:
      password - PKCS12 encryption password. This secret is also used to encrypt the inner private key.
      key - Private key.
      alias - Keystore alias.
      certificates - One or more certificates. If more than one certificate is provided, the first is taken as the end-entity certificate.
      Returns:
      Bouncy Castle PKCS12 container object.