Class JcaPKCS12SafeBagBuilder

java.lang.Object
org.bouncycastle.pkcs.PKCS12SafeBagBuilder
org.bouncycastle.pkcs.jcajce.JcaPKCS12SafeBagBuilder

public class JcaPKCS12SafeBagBuilder extends PKCS12SafeBagBuilder
JCA-aware extension of PKCS12SafeBagBuilder that accepts standard JCA X509Certificate and PrivateKey inputs.
  • Constructor Details

    • JcaPKCS12SafeBagBuilder

      public JcaPKCS12SafeBagBuilder(X509Certificate certificate) throws IOException
      Build a certBag from a JCA X509Certificate.
      Parameters:
      certificate - the certificate to wrap.
      Throws:
      IOException - if the certificate cannot be encoded.
    • JcaPKCS12SafeBagBuilder

      public JcaPKCS12SafeBagBuilder(PrivateKey privateKey, OutputEncryptor encryptor)
      Build a pkcs8ShroudedKeyBag by encrypting the supplied JCA PrivateKey.
      Parameters:
      privateKey - the private key to wrap.
      encryptor - the password-based output encryptor used to protect the key.
    • JcaPKCS12SafeBagBuilder

      public JcaPKCS12SafeBagBuilder(PrivateKey privateKey)
      Build a keyBag from a JCA PrivateKey (no encryption).
      Parameters:
      privateKey - the private key payload.