Class JcaPKCS12SafeBagBuilder
java.lang.Object
org.bouncycastle.pkcs.PKCS12SafeBagBuilder
org.bouncycastle.pkcs.jcajce.JcaPKCS12SafeBagBuilder
JCA-aware extension of
PKCS12SafeBagBuilder that accepts standard JCA
X509Certificate and PrivateKey inputs.-
Constructor Summary
ConstructorsConstructorDescriptionJcaPKCS12SafeBagBuilder(X509Certificate certificate) Build acertBagfrom a JCAX509Certificate.JcaPKCS12SafeBagBuilder(PrivateKey privateKey) Build akeyBagfrom a JCAPrivateKey(no encryption).JcaPKCS12SafeBagBuilder(PrivateKey privateKey, OutputEncryptor encryptor) Build apkcs8ShroudedKeyBagby encrypting the supplied JCAPrivateKey. -
Method Summary
Methods inherited from class PKCS12SafeBagBuilder
addBagAttribute, build
-
Constructor Details
-
JcaPKCS12SafeBagBuilder
Build acertBagfrom a JCAX509Certificate.- Parameters:
certificate- the certificate to wrap.- Throws:
IOException- if the certificate cannot be encoded.
-
JcaPKCS12SafeBagBuilder
Build apkcs8ShroudedKeyBagby encrypting the supplied JCAPrivateKey.- Parameters:
privateKey- the private key to wrap.encryptor- the password-based output encryptor used to protect the key.
-
JcaPKCS12SafeBagBuilder
Build akeyBagfrom a JCAPrivateKey(no encryption).- Parameters:
privateKey- the private key payload.
-