Package org.bouncycastle.cert.crmf.bc
Class BcEncryptedValueBuilder
java.lang.Object
org.bouncycastle.cert.crmf.EncryptedValueBuilder
org.bouncycastle.cert.crmf.bc.BcEncryptedValueBuilder
Lightweight convenience class for EncryptedValueBuilder
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionorg.bouncycastle.asn1.crmf.EncryptedValue
build
(X509Certificate certificate) Build an EncryptedValue structure containing the passed in certificate.org.bouncycastle.asn1.crmf.EncryptedValue
build
(org.bouncycastle.crypto.params.AsymmetricKeyParameter privateKey) Build an EncryptedValue structure containing the private key details contained in the passed PrivateKey.Methods inherited from class org.bouncycastle.cert.crmf.EncryptedValueBuilder
build, build, build
-
Constructor Details
-
BcEncryptedValueBuilder
-
-
Method Details
-
build
public org.bouncycastle.asn1.crmf.EncryptedValue build(X509Certificate certificate) throws CertificateEncodingException, CRMFException Build an EncryptedValue structure containing the passed in certificate.- Parameters:
certificate
- the certificate to be encrypted.- Returns:
- an EncryptedValue containing the encrypted certificate.
- Throws:
CRMFException
- on a failure to encrypt the data, or wrap the symmetric key for this value.CertificateEncodingException
-
build
public org.bouncycastle.asn1.crmf.EncryptedValue build(org.bouncycastle.crypto.params.AsymmetricKeyParameter privateKey) throws CRMFException, IOException Build an EncryptedValue structure containing the private key details contained in the passed PrivateKey.- Parameters:
privateKey
- a private key parameter.- Returns:
- an EncryptedValue containing an EncryptedPrivateKeyInfo structure.
- Throws:
CRMFException
- on a failure to encrypt the data, or wrap the symmetric key for this value.IOException
-