Bouncy Castle Cryptography Library 1.85

org.bouncycastle.pkcs.jcajce
Class JcaPKCS12SafeBagBuilder

java.lang.Object
  extended byorg.bouncycastle.pkcs.PKCS12SafeBagBuilder
      extended byorg.bouncycastle.pkcs.jcajce.JcaPKCS12SafeBagBuilder

public class JcaPKCS12SafeBagBuilder
extends PKCS12SafeBagBuilder

JCA-aware extension of PKCS12SafeBagBuilder that accepts standard JCA X509Certificate and PrivateKey inputs.


Constructor Summary
JcaPKCS12SafeBagBuilder(java.security.PrivateKey privateKey)
          Build a from a JCA PrivateKey (no encryption).
JcaPKCS12SafeBagBuilder(java.security.PrivateKey privateKey, OutputEncryptor encryptor)
          Build a by encrypting the supplied JCA PrivateKey.
JcaPKCS12SafeBagBuilder(java.security.cert.X509Certificate certificate)
          Build a from a JCA X509Certificate.
 
Methods inherited from class org.bouncycastle.pkcs.PKCS12SafeBagBuilder
addBagAttribute, build
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JcaPKCS12SafeBagBuilder

public JcaPKCS12SafeBagBuilder(java.security.cert.X509Certificate certificate)
                        throws java.io.IOException
Build a from a JCA X509Certificate.

Parameters:
certificate - the certificate to wrap.
Throws:
java.io.IOException - if the certificate cannot be encoded.

JcaPKCS12SafeBagBuilder

public JcaPKCS12SafeBagBuilder(java.security.PrivateKey privateKey,
                               OutputEncryptor encryptor)
Build a 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(java.security.PrivateKey privateKey)
Build a from a JCA PrivateKey (no encryption).

Parameters:
privateKey - the private key payload.

Bouncy Castle Cryptography Library 1.85