Table of Contents

Class EncryptedValueBuilder

Namespace
Org.BouncyCastle.Crmf
Assembly
BouncyCastle.Cryptography.dll
public class EncryptedValueBuilder
Inheritance
EncryptedValueBuilder
Inherited Members

Constructors

EncryptedValueBuilder(IKeyWrapper, ICipherBuilderWithKey)

public EncryptedValueBuilder(IKeyWrapper wrapper, ICipherBuilderWithKey encryptor)

Parameters

wrapper IKeyWrapper

wrapper a wrapper for key used to encrypt the actual data contained in the EncryptedValue.

encryptor ICipherBuilderWithKey

encryptor an output encryptor to encrypt the actual data contained in the EncryptedValue.

EncryptedValueBuilder(IKeyWrapper, ICipherBuilderWithKey, IEncryptedValuePadder)

public EncryptedValueBuilder(IKeyWrapper wrapper, ICipherBuilderWithKey encryptor, IEncryptedValuePadder padder)

Parameters

wrapper IKeyWrapper

a wrapper for key used to encrypt the actual data contained in the EncryptedValue.

encryptor ICipherBuilderWithKey

encryptor an output encryptor to encrypt the actual data contained in the EncryptedValue.

padder IEncryptedValuePadder

padder a padder to ensure that the EncryptedValue created will always be a constant length.

Methods

Build(PrivateKeyInfo)

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

public EncryptedValue Build(PrivateKeyInfo privateKeyInfo)

Parameters

privateKeyInfo PrivateKeyInfo

a PKCS#8 private key info structure.

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.

Build(X509Certificate)

Build an EncryptedValue structure containing the certificate contained in the passed in holder.

public EncryptedValue Build(X509Certificate holder)

Parameters

holder X509Certificate

a holder containing a certificate.

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.

Build(char[])

public EncryptedValue Build(char[] revocationPassphrase)

Parameters

revocationPassphrase char[]

a revocation pass phrase.

Returns

EncryptedValue

an EncryptedValue containing the encrypted pass phrase.