Class CmsWriter
Writes CMS structures to DER-encoded bytes (RFC 5652). Serializes SignedData and EnvelopedData. SET OF elements are sorted per DER requirements.
Inherited Members
Namespace: DRIT.Mail.Rfc.Crypto.Cms
Assembly: DRIT.Mail.dll
Syntax
public static class CmsWriter
Methods
View SourceWriteContentInfo(string, byte[]?)
Wraps content in a ContentInfo envelope and serializes to DER-encoded bytes.
Declaration
public static byte[] WriteContentInfo(string contentType, byte[]? content)
Parameters
| Type | Name | Description |
|---|---|---|
| string | contentType | The content type used by the operation. |
| byte[] | content | Specifies the content value. |
Returns
| Type | Description |
|---|---|
| byte[] |
WriteEnvelopedData(EnvelopedData)
Serializes an EnvelopedData structure to DER-encoded bytes.
Declaration
public static byte[] WriteEnvelopedData(EnvelopedData data)
Parameters
| Type | Name | Description |
|---|---|---|
| EnvelopedData | data | The data to process. |
Returns
| Type | Description |
|---|---|
| byte[] |
WriteSignedData(SignedData)
Serializes a SignedData structure to DER-encoded bytes.
Declaration
public static byte[] WriteSignedData(SignedData data)
Parameters
| Type | Name | Description |
|---|---|---|
| SignedData | data | The data to process. |
Returns
| Type | Description |
|---|---|
| byte[] |