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

public Class JcaEncryptedValueBuilder

extends EncryptedValueBuilder
Class Inheritance
Imports
java.security.PrivateKey, java.security.cert.CertificateEncodingException, .X509Certificate, org.bouncycastle.asn1.crmf.EncryptedValue, org.bouncycastle.asn1.pkcs.PrivateKeyInfo, org.bouncycastle.cert.crmf.CRMFException, .EncryptedValueBuilder, org.bouncycastle.cert.jcajce.JcaX509CertificateHolder, org.bouncycastle.operator.KeyWrapper, .OutputEncryptor

JCA 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
(PrivateKey
the asymmetric private key.
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

JcaEncryptedValueBuilderback to summary
public JcaEncryptedValueBuilder(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(PrivateKey privateKey) throws CertificateEncodingException, CRMFException

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

Parameters
privateKey:PrivateKey

the asymmetric private key.

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.