Bouncy Castle Cryptography Library 1.59

org.bouncycastle.cert.crmf.jcajce
Class JcaEncryptedValueBuilder

java.lang.Object
  |
  +--org.bouncycastle.cert.crmf.EncryptedValueBuilder
        |
        +--org.bouncycastle.cert.crmf.jcajce.JcaEncryptedValueBuilder

public class JcaEncryptedValueBuilder
extends EncryptedValueBuilder

JCA convenience class for EncryptedValueBuilder


Constructor Summary
JcaEncryptedValueBuilder(KeyWrapper wrapper, OutputEncryptor encryptor)
           
 
Method Summary
 org.bouncycastle.asn1.crmf.EncryptedValue build(java.security.PrivateKey privateKey)
          Build an EncryptedValue structure containing the private key details contained in the passed PrivateKey.
 org.bouncycastle.asn1.crmf.EncryptedValue build(java.security.cert.X509Certificate certificate)
          Build an EncryptedValue structure containing the passed in certificate.
 
Methods inherited from class org.bouncycastle.cert.crmf.EncryptedValueBuilder
build, build, build
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JcaEncryptedValueBuilder

public JcaEncryptedValueBuilder(KeyWrapper wrapper,
                                OutputEncryptor encryptor)
Method Detail

build

public org.bouncycastle.asn1.crmf.EncryptedValue build(java.security.cert.X509Certificate certificate)
                                                throws java.security.cert.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.

build

public org.bouncycastle.asn1.crmf.EncryptedValue build(java.security.PrivateKey privateKey)
                                                throws java.security.cert.CertificateEncodingException,
                                                       CRMFException
Build an EncryptedValue structure containing the private key details contained in the passed PrivateKey.
Parameters:
privateKey - a PKCS#8 private key info structure.
Returns:
an EncryptedValue containing an EncryptedPrivateKeyInfo structure.
Throws:
CRMFException - on a failure to encrypt the data, or wrap the symmetric key for this value.

Bouncy Castle Cryptography Library 1.59