Class PKCS12SafeBagFactory
java.lang.Object
org.bouncycastle.pkcs.PKCS12SafeBagFactory
Factory that materialises the
PKCS12SafeBags carried in one ContentInfo of a
PFX's AuthenticatedSafe. Use the single-argument constructor for plain data content
infos and the two-argument constructor with an InputDecryptorProvider for
encryptedData content infos.-
Constructor Summary
ConstructorsConstructorDescriptionPKCS12SafeBagFactory(org.bouncycastle.asn1.pkcs.ContentInfo info) Construct a factory over a plain (unencrypted)dataContentInfo.PKCS12SafeBagFactory(org.bouncycastle.asn1.pkcs.ContentInfo info, InputDecryptorProvider inputDecryptorProvider) Construct a factory over anencryptedDataContentInfo, decrypting its contents with the supplied provider. -
Method Summary
Modifier and TypeMethodDescriptionReturn thePKCS12SafeBags contained in the ContentInfo this factory was created over.
-
Constructor Details
-
PKCS12SafeBagFactory
public PKCS12SafeBagFactory(org.bouncycastle.asn1.pkcs.ContentInfo info) Construct a factory over a plain (unencrypted)dataContentInfo.- Parameters:
info- the ContentInfo holding the SafeContents.- Throws:
IllegalArgumentException- ifinfois anencryptedDataContentInfo.
-
PKCS12SafeBagFactory
public PKCS12SafeBagFactory(org.bouncycastle.asn1.pkcs.ContentInfo info, InputDecryptorProvider inputDecryptorProvider) throws PKCSException Construct a factory over anencryptedDataContentInfo, decrypting its contents with the supplied provider.- Parameters:
info- the encrypted ContentInfo.inputDecryptorProvider- provider able to produce a decryptor matching the algorithm identifier carried byinfo.- Throws:
PKCSException- if decryption fails.IllegalArgumentException- ifinfois not anencryptedDataContentInfo.
-
-
Method Details
-
getSafeBags
Return thePKCS12SafeBags contained in the ContentInfo this factory was created over.- Returns:
- the SafeBags as an array.
-