MimeMessage.SetEnvelopedContent Method
Namespace: Rebex.Mime
Assembly: Rebex.Mail.dll (version 7.0.9119)
SetEnvelopedContent(MimeEntity, Certificate[])
Sets the content of this entity to the specified enveloped entity. Inherited from MimeEntity.
Declaration
public void SetEnvelopedContent(MimeEntity entity, params Certificate[] recipients)
Parameters
Type | Name | Description |
---|---|---|
MimeEntity | entity | Entity to be enveloped. |
Certificate[] | recipients | The list of recipients' certificates. |
Remarks
The purpose of enveloped content is to be encrypted. Call the Encrypt() method prior to saving or sending the message.
SetEnvelopedContent(MimeEntity, String, Certificate[])
Sets the content of this entity to the specified enveloped entity. Inherited from MimeEntity.
Declaration
public void SetEnvelopedContent(MimeEntity entity, string encryptionAlgorithm, params Certificate[] recipients)
Parameters
Type | Name | Description |
---|---|---|
MimeEntity | entity | Entity to be enveloped. |
String | encryptionAlgorithm | Encryption algorithm OID. Can be null for 3DES. |
Certificate[] | recipients | The list of recipients' certificates. |
Remarks
The purpose of enveloped content is to be encrypted. Call the Encrypt() method prior to saving or sending the message.
Currently, 3DES ("1.2.840.113549.3.7"), AES ("2.16.840.1.101.3.4.1.2" for 128-bit, "2.16.840.1.101.3.4.1.22" for 192-bit and "2.16.840.1.101.3.4.1.42" for 256-bit), DES ("1.3.14.3.2.7") and RC2 ("1.2.840.113549.3.2") encryption algorithms are supported.
SetEnvelopedContent(MimeEntity, String, EncryptionParameters, Certificate[])
Sets the content of this entity to the specified enveloped entity. Inherited from MimeEntity.
Declaration
public void SetEnvelopedContent(MimeEntity entity, string encryptionAlgorithm, EncryptionParameters encryptionParameters, params Certificate[] recipients)
Parameters
Type | Name | Description |
---|---|---|
MimeEntity | entity | Entity to be enveloped. |
String | encryptionAlgorithm | Encryption algorithm OID. Can be null for 3DES. |
EncryptionParameters | encryptionParameters | Encryption parameters (to specify RSAES-OAEP parameters). Can be null (for PKCS #1). |
Certificate[] | recipients | The list of recipients' certificates. |
Remarks
The purpose of enveloped content is to be encrypted. Call the Encrypt() method prior to saving or sending the message.
Currently, 3DES ("1.2.840.113549.3.7"), AES ("2.16.840.1.101.3.4.1.2" for 128-bit, "2.16.840.1.101.3.4.1.22" for 192-bit and "2.16.840.1.101.3.4.1.42" for 256-bit), DES ("1.3.14.3.2.7") and RC2 ("1.2.840.113549.3.2") encryption algorithms are supported.
SetEnvelopedContent(MimeEntity, SymmetricKeyAlgorithmId, EncryptionParameters, Certificate[])
Sets the content of this entity to the specified enveloped entity. Inherited from MimeEntity.
Declaration
public void SetEnvelopedContent(MimeEntity entity, SymmetricKeyAlgorithmId encryptionAlgorithm, EncryptionParameters encryptionParameters, params Certificate[] recipients)
Parameters
Type | Name | Description |
---|---|---|
MimeEntity | entity | Entity to be enveloped. |
SymmetricKeyAlgorithmId | encryptionAlgorithm | Encryption algorithm. |
EncryptionParameters | encryptionParameters | Encryption parameters (to specify RSAES-OAEP parameters). Can be null (for PKCS #1). |
Certificate[] | recipients | The list of recipients' certificates. |
Remarks
The purpose of enveloped content is to be encrypted. Call the Encrypt() method prior to saving or sending the message.
Currently, AES-256, AES-192, AES-128, 3DES, DES, RC2 encryption algorithms are supported.
SetEnvelopedContent(MimeEntity, SymmetricKeyAlgorithmId, Nullable<Int32>, EncryptionParameters, Certificate[])
Sets the content of this entity to the specified enveloped entity. Inherited from MimeEntity.
Declaration
public void SetEnvelopedContent(MimeEntity entity, SymmetricKeyAlgorithmId encryptionAlgorithm, int? keySize, EncryptionParameters encryptionParameters, params Certificate[] recipients)
Parameters
Type | Name | Description |
---|---|---|
MimeEntity | entity | Entity to be enveloped. |
SymmetricKeyAlgorithmId | encryptionAlgorithm | Encryption algorithm. |
Nullable<Int32> | keySize | The key size in bits. Only used for AES (to specify key size) and RC2 (to specify effective key size). |
EncryptionParameters | encryptionParameters | Encryption parameters (to specify RSAES-OAEP parameters). Can be null (for PKCS #1). |
Certificate[] | recipients | The list of recipients' certificates. |
Remarks
The purpose of enveloped content is to be encrypted. Call the Encrypt() method prior to saving or sending the message.
Currently, AES-256, AES-192, AES-128, 3DES, DES, RC2 encryption algorithms are supported.