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
wrapperIKeyWrapperwrapper a wrapper for key used to encrypt the actual data contained in the EncryptedValue.
encryptorICipherBuilderWithKeyencryptor 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
wrapperIKeyWrappera wrapper for key used to encrypt the actual data contained in the EncryptedValue.
encryptorICipherBuilderWithKeyencryptor an output encryptor to encrypt the actual data contained in the EncryptedValue.
padderIEncryptedValuePadderpadder 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
privateKeyInfoPrivateKeyInfoa 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
holderX509Certificatea 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
revocationPassphrasechar[]a revocation pass phrase.
Returns
- EncryptedValue
an EncryptedValue containing the encrypted pass phrase.