Top Description Fields Constructors Methods
org.bouncycastle.cert.crmf

public Class PKIArchiveControlBuilder

extends Object
Class Inheritance
Known Direct Subclasses
org.bouncycastle.cert.crmf.jcajce.JcaPKIArchiveControlBuilder
Imports
java.io.IOException, org.bouncycastle.asn1.cms.EnvelopedData, org.bouncycastle.asn1.crmf.CRMFObjectIdentifiers, .EncKeyWithID, .EncryptedKey, .PKIArchiveOptions, org.bouncycastle.asn1.pkcs.PrivateKeyInfo, org.bouncycastle.asn1.x509.GeneralName, org.bouncycastle.cms.CMSEnvelopedData, .CMSEnvelopedDataGenerator, .CMSException, .CMSProcessableByteArray, .RecipientInfoGenerator, org.bouncycastle.operator.OutputEncryptor

Builder for a PKIArchiveControl structure.

Field Summary

Modifier and TypeField and Description
private CMSEnvelopedDataGenerator
private CMSProcessableByteArray

Constructor Summary

AccessConstructor and Description
public
PKIArchiveControlBuilder(PrivateKeyInfo
the private key to be archived.
privateKeyInfo
,
GeneralName
the general name to be associated with the private key.
generalName
)

Basic constructor - specify the contents of the PKIArchiveControl structure.

Method Summary

Modifier and TypeMethod and Description
public PKIArchiveControlBuilder

Returns:

this builder object.
addRecipientGenerator
(RecipientInfoGenerator
recipient generator created for a specific recipient.
recipientGen
)

Add a recipient generator to this control.

public PKIArchiveControl

Returns:

a PKIArchiveControl object.
build
(OutputEncryptor
a suitable content encryptor.
contentEncryptor
)

Build the PKIArchiveControl using the passed in encryptor to encrypt its contents.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

envGenback to summary
private CMSEnvelopedDataGenerator envGen
keyContentback to summary
private CMSProcessableByteArray keyContent

Constructor Detail

PKIArchiveControlBuilderback to summary
public PKIArchiveControlBuilder(PrivateKeyInfo privateKeyInfo, GeneralName generalName)

Basic constructor - specify the contents of the PKIArchiveControl structure.

Parameters
privateKeyInfo:PrivateKeyInfo

the private key to be archived.

generalName:GeneralName

the general name to be associated with the private key.

Method Detail

addRecipientGeneratorback to summary
public PKIArchiveControlBuilder addRecipientGenerator(RecipientInfoGenerator recipientGen)

Add a recipient generator to this control.

Parameters
recipientGen:RecipientInfoGenerator

recipient generator created for a specific recipient.

Returns:PKIArchiveControlBuilder

this builder object.

buildback to summary
public PKIArchiveControl build(OutputEncryptor contentEncryptor) throws CMSException

Build the PKIArchiveControl using the passed in encryptor to encrypt its contents.

Parameters
contentEncryptor:OutputEncryptor

a suitable content encryptor.

Returns:PKIArchiveControl

a PKIArchiveControl object.

Exceptions
CMSException:
in the event the build fails.