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

public Class BcEncryptedValueBuilder

extends EncryptedValueBuilder
Class Inheritance
Imports
java.io.IOException, java.security.cert.CertificateEncodingException, .X509Certificate, org.bouncycastle.asn1.crmf.EncryptedValue, org.bouncycastle.cert.crmf.CRMFException, .EncryptedValueBuilder, org.bouncycastle.cert.jcajce.JcaX509CertificateHolder, org.bouncycastle.crypto.params.AsymmetricKeyParameter, org.bouncycastle.crypto.util.PrivateKeyInfoFactory, org.bouncycastle.operator.KeyWrapper, .OutputEncryptor

Lightweight convenience class for EncryptedValueBuilder

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public EncryptedValue

Returns:

an EncryptedValue containing the encrypted certificate.
build
(X509Certificate
the certificate to be encrypted.
certificate
)

Build an EncryptedValue structure containing the passed in certificate.

public EncryptedValue

Returns:

an EncryptedValue containing an EncryptedPrivateKeyInfo structure.
build
(AsymmetricKeyParameter
a private key parameter.
privateKey
)

Build an EncryptedValue structure containing the private key details contained in the passed PrivateKey.

Inherited from org.bouncycastle.cert.crmf.EncryptedValueBuilder:
buildbuildbuild

Constructor Detail

BcEncryptedValueBuilderback to summary
public BcEncryptedValueBuilder(KeyWrapper wrapper, OutputEncryptor encryptor)

Method Detail

buildback to summary
public EncryptedValue build(X509Certificate certificate) throws CertificateEncodingException, CRMFException

Build an EncryptedValue structure containing the passed in certificate.

Parameters
certificate:X509Certificate

the certificate to be encrypted.

Returns:EncryptedValue

an EncryptedValue containing the encrypted certificate.

Exceptions
CRMFException:
on a failure to encrypt the data, or wrap the symmetric key for this value.
buildback to summary
public EncryptedValue build(AsymmetricKeyParameter privateKey) throws CRMFException, IOException

Build an EncryptedValue structure containing the private key details contained in the passed PrivateKey.

Parameters
privateKey:AsymmetricKeyParameter

a private key parameter.

Returns:EncryptedValue

an EncryptedValue containing an EncryptedPrivateKeyInfo structure.

Exceptions
CRMFException:
on a failure to encrypt the data, or wrap the symmetric key for this value.