Table of Contents

Class CmsEnvelopedGenerator

Namespace
Org.BouncyCastle.Cms
Assembly
BouncyCastle.Cryptography.dll
public abstract class CmsEnvelopedGenerator
Inheritance
CmsEnvelopedGenerator
Derived
Inherited Members

Constructors

CmsEnvelopedGenerator()

protected CmsEnvelopedGenerator()

CmsEnvelopedGenerator(SecureRandom)

Constructor allowing specific source of randomness

protected CmsEnvelopedGenerator(SecureRandom random)

Parameters

random SecureRandom

Instance of SecureRandom to use.

Fields

Aes128Cbc

public static readonly string Aes128Cbc

Field Value

string

Aes128Ccm

public static readonly string Aes128Ccm

Field Value

string

Aes128Gcm

public static readonly string Aes128Gcm

Field Value

string

Aes128Wrap

public static readonly string Aes128Wrap

Field Value

string

Aes192Cbc

public static readonly string Aes192Cbc

Field Value

string

Aes192Ccm

public static readonly string Aes192Ccm

Field Value

string

Aes192Gcm

public static readonly string Aes192Gcm

Field Value

string

Aes192Wrap

public static readonly string Aes192Wrap

Field Value

string

Aes256Cbc

public static readonly string Aes256Cbc

Field Value

string

Aes256Ccm

public static readonly string Aes256Ccm

Field Value

string

Aes256Gcm

public static readonly string Aes256Gcm

Field Value

string

Aes256Wrap

public static readonly string Aes256Wrap

Field Value

string

Camellia128Cbc

public static readonly string Camellia128Cbc

Field Value

string

Camellia128Wrap

public static readonly string Camellia128Wrap

Field Value

string

Camellia192Cbc

public static readonly string Camellia192Cbc

Field Value

string

Camellia192Wrap

public static readonly string Camellia192Wrap

Field Value

string

Camellia256Cbc

public static readonly string Camellia256Cbc

Field Value

string

Camellia256Wrap

public static readonly string Camellia256Wrap

Field Value

string

Cast5Cbc

public const string Cast5Cbc = "1.2.840.113533.7.66.10"

Field Value

string

DesCbc

public static readonly string DesCbc

Field Value

string

DesEde3Cbc

public static readonly string DesEde3Cbc

Field Value

string

DesEde3Wrap

public static readonly string DesEde3Wrap

Field Value

string

ECCDHSha1Kdf

public static readonly string ECCDHSha1Kdf

Field Value

string

ECCDHSha224Kdf

public static readonly string ECCDHSha224Kdf

Field Value

string

ECCDHSha256Kdf

public static readonly string ECCDHSha256Kdf

Field Value

string

ECCDHSha384Kdf

public static readonly string ECCDHSha384Kdf

Field Value

string

ECCDHSha512Kdf

public static readonly string ECCDHSha512Kdf

Field Value

string

ECDHSha1Kdf

public static readonly string ECDHSha1Kdf

Field Value

string

ECDHSha224Kdf

public static readonly string ECDHSha224Kdf

Field Value

string

ECDHSha256Kdf

public static readonly string ECDHSha256Kdf

Field Value

string

ECDHSha384Kdf

public static readonly string ECDHSha384Kdf

Field Value

string

ECDHSha512Kdf

public static readonly string ECDHSha512Kdf

Field Value

string

ECMqvSha1Kdf

public static readonly string ECMqvSha1Kdf

Field Value

string

ECMqvSha224Kdf

public static readonly string ECMqvSha224Kdf

Field Value

string

ECMqvSha256Kdf

public static readonly string ECMqvSha256Kdf

Field Value

string

ECMqvSha384Kdf

public static readonly string ECMqvSha384Kdf

Field Value

string

ECMqvSha512Kdf

public static readonly string ECMqvSha512Kdf

Field Value

string

Gost28147CryptoProWrap

public static readonly string Gost28147CryptoProWrap

Field Value

string

Gost28147Wrap

public static readonly string Gost28147Wrap

Field Value

string

IdeaCbc

public const string IdeaCbc = "1.3.6.1.4.1.188.7.1.1.2"

Field Value

string

RC2Cbc

public static readonly string RC2Cbc

Field Value

string

SeedCbc

public static readonly string SeedCbc

Field Value

string

SeedWrap

public static readonly string SeedWrap

Field Value

string

Properties

UnprotectedAttributeGenerator

public CmsAttributeTableGenerator UnprotectedAttributeGenerator { get; set; }

Property Value

CmsAttributeTableGenerator

Methods

AddKekRecipient(string, KeyParameter, KekIdentifier)

public void AddKekRecipient(string keyAlgorithm, KeyParameter key, KekIdentifier kekIdentifier)

Parameters

keyAlgorithm string
key KeyParameter
kekIdentifier KekIdentifier

AddKekRecipient(string, KeyParameter, byte[])

public void AddKekRecipient(string keyAlgorithm, KeyParameter key, byte[] keyIdentifier)

Parameters

keyAlgorithm string
key KeyParameter
keyIdentifier byte[]

AddKeyAgreementRecipient(string, AsymmetricKeyParameter, AsymmetricKeyParameter, X509Certificate, string)

public void AddKeyAgreementRecipient(string agreementAlgorithm, AsymmetricKeyParameter senderPrivateKey, AsymmetricKeyParameter senderPublicKey, X509Certificate recipientCert, string cekWrapAlgorithm)

Parameters

agreementAlgorithm string
senderPrivateKey AsymmetricKeyParameter
senderPublicKey AsymmetricKeyParameter
recipientCert X509Certificate
cekWrapAlgorithm string

AddKeyAgreementRecipient(string, AsymmetricKeyParameter, AsymmetricKeyParameter, byte[], AsymmetricKeyParameter, string)

public void AddKeyAgreementRecipient(string agreementAlgorithm, AsymmetricKeyParameter senderPrivateKey, AsymmetricKeyParameter senderPublicKey, byte[] recipientKeyID, AsymmetricKeyParameter recipientPublicKey, string cekWrapAlgorithm)

Parameters

agreementAlgorithm string
senderPrivateKey AsymmetricKeyParameter
senderPublicKey AsymmetricKeyParameter
recipientKeyID byte[]
recipientPublicKey AsymmetricKeyParameter
cekWrapAlgorithm string

AddKeyAgreementRecipients(string, AsymmetricKeyParameter, AsymmetricKeyParameter, IEnumerable<X509Certificate>, string)

public void AddKeyAgreementRecipients(string agreementAlgorithm, AsymmetricKeyParameter senderPrivateKey, AsymmetricKeyParameter senderPublicKey, IEnumerable<X509Certificate> recipientCerts, string cekWrapAlgorithm)

Parameters

agreementAlgorithm string
senderPrivateKey AsymmetricKeyParameter
senderPublicKey AsymmetricKeyParameter
recipientCerts IEnumerable<X509Certificate>
cekWrapAlgorithm string

AddKeyTransRecipient(AsymmetricKeyParameter, byte[])

public void AddKeyTransRecipient(AsymmetricKeyParameter pubKey, byte[] subKeyId)

Parameters

pubKey AsymmetricKeyParameter
subKeyId byte[]

AddKeyTransRecipient(X509Certificate)

public void AddKeyTransRecipient(X509Certificate cert)

Parameters

cert X509Certificate

AddKeyTransRecipient(string, AsymmetricKeyParameter, byte[])

public void AddKeyTransRecipient(string algorithm, AsymmetricKeyParameter pubKey, byte[] subKeyId)

Parameters

algorithm string
pubKey AsymmetricKeyParameter
subKeyId byte[]

AddKeyTransRecipient(string, X509Certificate)

public void AddKeyTransRecipient(string algorithm, X509Certificate cert)

Parameters

algorithm string
cert X509Certificate

AddPasswordRecipient(CmsPbeKey, string)

public void AddPasswordRecipient(CmsPbeKey pbeKey, string kekAlgorithmOid)

Parameters

pbeKey CmsPbeKey
kekAlgorithmOid string

AddRecipientInfoGenerator(RecipientInfoGenerator)

Add a generator to produce the recipient info required.

public void AddRecipientInfoGenerator(RecipientInfoGenerator recipientInfoGenerator)

Parameters

recipientInfoGenerator RecipientInfoGenerator

a generator of a recipient info object.

GenerateAsn1Parameters(string, byte[])

protected virtual Asn1Encodable GenerateAsn1Parameters(string encryptionOid, byte[] encKeyBytes)

Parameters

encryptionOid string
encKeyBytes byte[]

Returns

Asn1Encodable

GetAlgorithmIdentifier(string, KeyParameter, Asn1Encodable, out ICipherParameters)

protected virtual AlgorithmIdentifier GetAlgorithmIdentifier(string encryptionOid, KeyParameter encKey, Asn1Encodable asn1Params, out ICipherParameters cipherParameters)

Parameters

encryptionOid string
encKey KeyParameter
asn1Params Asn1Encodable
cipherParameters ICipherParameters

Returns

AlgorithmIdentifier