public class JcaEncryptedValueBuilder extends EncryptedValueBuilder
Constructor and Description |
---|
JcaEncryptedValueBuilder(KeyWrapper wrapper,
OutputEncryptor encryptor) |
Modifier and Type | Method and Description |
---|---|
EncryptedValue |
build(PrivateKey privateKey)
Build an EncryptedValue structure containing the private key details contained in
the passed PrivateKey.
|
EncryptedValue |
build(X509Certificate certificate)
Build an EncryptedValue structure containing the passed in certificate.
|
build, build, build
public JcaEncryptedValueBuilder(KeyWrapper wrapper, OutputEncryptor encryptor)
public EncryptedValue build(X509Certificate certificate) throws CertificateEncodingException, CRMFException
certificate
- the certificate to be encrypted.CRMFException
- on a failure to encrypt the data, or wrap the symmetric key for this value.CertificateEncodingException
public EncryptedValue build(PrivateKey privateKey) throws CertificateEncodingException, CRMFException
privateKey
- a PKCS#8 private key info structure.CRMFException
- on a failure to encrypt the data, or wrap the symmetric key for this value.CertificateEncodingException
Copyright © 2018 BouncyCastle.org. All rights reserved.