# CmsSignedDataSigner

Creates interoperable CMS SignedData without exporting a private key.

Class 

`OfficeIMO.Security`

**Namespace**

`OfficeIMO.Security`

**Assembly**

`OfficeIMO.Security`

**Source revision**

`ba882f6b0d07` with working tree changes

**Source**

[CmsSignedDataSigner.cs:20](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Security/CmsSignedDataSigner.cs#L20)

**Modifiers**

static

Creates interoperable CMS SignedData without exporting a private key.

## Inheritance

- object
- CmsSignedDataSigner

Filter members 

Show inherited

## Methods

`public static byte[] SignDetached(byte[] content, X509Certificate2 signingCertificate, CmsSigningOptions? options = null, IEnumerable<X509Certificate2>? certificateChain = null)` [#](#member-292d4f445c39e58771f5d3f2)

[CmsSignedDataSigner.cs:20](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Security/CmsSignedDataSigner.cs#L20)

Creates a detached CMS signature over content.

Parameters

**content byte[] required**

**signingCertificate System.Security.Cryptography.X509Certificates.X509Certificate2 required**

**options OfficeIMO.Security.CmsSigningOptions? = null optional**

**certificateChain System.Collections.Generic.IEnumerable<System.Security.Cryptography.X509Certificates.X509Certificate2>? = null optional**

Returns

`byte[]`

`public static byte[] SignEncapsulated(byte[] content, X509Certificate2 signingCertificate, CmsSigningOptions? options = null, IEnumerable<X509Certificate2>? certificateChain = null)` [#](#member-d7b73a4de9b4d6861597db7e)

[CmsSignedDataSigner.cs:28](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Security/CmsSignedDataSigner.cs#L28)

Creates an encapsulated CMS SignedData object containing content.

Parameters

**content byte[] required**

**signingCertificate System.Security.Cryptography.X509Certificates.X509Certificate2 required**

**options OfficeIMO.Security.CmsSigningOptions? = null optional**

**certificateChain System.Collections.Generic.IEnumerable<System.Security.Cryptography.X509Certificates.X509Certificate2>? = null optional**

Returns

`byte[]`

## Inherited Methods

`public virtual bool Equals(object? obj)` [#](#method-equals-object)

Inherited from object

Parameters

**obj object? required**

Returns

`bool`

`public virtual int GetHashCode()` [#](#method-gethashcode)

Inherited from object

Returns

`int`

`public Type GetType()` [#](#method-gettype)

Inherited from object

Returns

`Type`

`public virtual string? ToString()` [#](#method-tostring)

Inherited from object

Returns

`string?`

<!-- PowerForge markdown artifact sha256:97BE044D8E9517FE1D1D7E3E340F46C456878B09972E78CD4477FFC73B77375C -->
