# WordPackageSigningOptions

Options for signing a DOCX package through the cross-platform OPC XML-signature engine.

Class 

`OfficeIMO.Word`

**Namespace**

`OfficeIMO.Word`

**Assembly**

`OfficeIMO.Word`

**Source revision**

`089f66d6d97a` with working tree changes

**Source**

[WordPackageSigning.cs:87](https://github.com/EvotecIT/OfficeIMO/blob/089f66d6d97a67726fd541e10d95d86d5929ec69/OfficeIMO.Word/WordPackageSigning.cs#L87)

**Modifiers**

sealed

Options for signing a DOCX package through the cross-platform OPC XML-signature engine.

## Inheritance

- object
- WordPackageSigningOptions

## Usage

Explore 4 API references to this type

This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.

### Accepted by parameters 4

- Method [WordDocument.SignPackage](/api/word/officeimo-word-worddocument/#method-signpackage-string-officeimo-security-iofficesecurityprovider-security-cryptography-x509certificates-x509certificate2-officeimo-word-wordpackagesigningoptions) parameter `options`
- Method [WordDocument.SignPackage](/api/word/officeimo-word-worddocument/#method-signpackage-string-officeimo-security-iofficesecurityprovider-string-officeimo-word-wordpackagecertificatestoreoptions-officeimo-word-wordpackagesigningoptions) parameter `signingOptions`
- Method [WordDocument.TrySignPackage](/api/word/officeimo-word-worddocument/#method-trysignpackage-string-officeimo-security-iofficesecurityprovider-security-cryptography-x509certificates-x509certificate2-officeimo-word-wordpackagesigningoptions) parameter `options`
- Method [WordDocument.TrySignPackage](/api/word/officeimo-word-worddocument/#method-trysignpackage-string-officeimo-security-iofficesecurityprovider-string-officeimo-word-wordpackagecertificatestoreoptions-officeimo-word-wordpackagesigningoptions) parameter `signingOptions`

Filter members 

Show inherited

## Constructors

`public WordPackageSigningOptions()` [#](#constructor-ctor)

[WordPackageSigning.cs:87](https://github.com/EvotecIT/OfficeIMO/blob/089f66d6d97a67726fd541e10d95d86d5929ec69/OfficeIMO.Word/WordPackageSigning.cs#L87)

## 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?`

## Properties

`public IReadOnlyCollection<string>? PartUris { get; set; }` [#](#property-parturis)

[WordPackageSigning.cs:82](https://github.com/EvotecIT/OfficeIMO/blob/089f66d6d97a67726fd541e10d95d86d5929ec69/OfficeIMO.Word/WordPackageSigning.cs#L82)

Gets or sets explicit package-part URIs to sign. When null, all existing non-signature package parts are signed.

`public bool IncludePackageRelationships { get; set; }` [#](#property-includepackagerelationships)

[WordPackageSigning.cs:87](https://github.com/EvotecIT/OfficeIMO/blob/089f66d6d97a67726fd541e10d95d86d5929ec69/OfficeIMO.Word/WordPackageSigning.cs#L87)

Gets or sets whether package-level relationships are included in the signature.

`public bool IncludePartRelationships { get; set; }` [#](#property-includepartrelationships)

[WordPackageSigning.cs:92](https://github.com/EvotecIT/OfficeIMO/blob/089f66d6d97a67726fd541e10d95d86d5929ec69/OfficeIMO.Word/WordPackageSigning.cs#L92)

Gets or sets whether relationships owned by individual package parts are included in the signature.

`public string HashAlgorithm { get; set; }` [#](#property-hashalgorithm)

[WordPackageSigning.cs:97](https://github.com/EvotecIT/OfficeIMO/blob/089f66d6d97a67726fd541e10d95d86d5929ec69/OfficeIMO.Word/WordPackageSigning.cs#L97)

Gets or sets the XML DSig hash algorithm URI.

`public string? SignatureId { get; set; }` [#](#property-signatureid)

[WordPackageSigning.cs:102](https://github.com/EvotecIT/OfficeIMO/blob/089f66d6d97a67726fd541e10d95d86d5929ec69/OfficeIMO.Word/WordPackageSigning.cs#L102)

Gets or sets an optional signature id.

`public DateTimeOffset? SigningTime { get; set; }` [#](#property-signingtime)

[WordPackageSigning.cs:108](https://github.com/EvotecIT/OfficeIMO/blob/089f66d6d97a67726fd541e10d95d86d5929ec69/OfficeIMO.Word/WordPackageSigning.cs#L108)

Gets or sets the claimed OPC signing time. Current UTC time is used when omitted. This is signed metadata, not an RFC 3161 timestamp-authority token.

`public IReadOnlyCollection<X509Certificate2>? AdditionalCertificates { get; set; }` [#](#property-additionalcertificates)

[WordPackageSigning.cs:111](https://github.com/EvotecIT/OfficeIMO/blob/089f66d6d97a67726fd541e10d95d86d5929ec69/OfficeIMO.Word/WordPackageSigning.cs#L111)

Gets or sets optional intermediate or root certificates embedded with the signer certificate.

`public int MaxPackageParts { get; set; }` [#](#property-maxpackageparts)

[WordPackageSigning.cs:114](https://github.com/EvotecIT/OfficeIMO/blob/089f66d6d97a67726fd541e10d95d86d5929ec69/OfficeIMO.Word/WordPackageSigning.cs#L114)

Gets or sets the maximum number of ZIP entries accepted while signing. Defaults to 10,000.

`public long MaxPackageBytes { get; set; }` [#](#property-maxpackagebytes)

[WordPackageSigning.cs:117](https://github.com/EvotecIT/OfficeIMO/blob/089f66d6d97a67726fd541e10d95d86d5929ec69/OfficeIMO.Word/WordPackageSigning.cs#L117)

Gets or sets the maximum encoded package bytes accepted while signing. Defaults to 512 MiB.

`public long MaxPartBytes { get; set; }` [#](#property-maxpartbytes)

[WordPackageSigning.cs:120](https://github.com/EvotecIT/OfficeIMO/blob/089f66d6d97a67726fd541e10d95d86d5929ec69/OfficeIMO.Word/WordPackageSigning.cs#L120)

Gets or sets the maximum uncompressed bytes read from one signed part. Defaults to 256 MiB.

`public long MaxTotalDigestBytes { get; set; }` [#](#property-maxtotaldigestbytes)

[WordPackageSigning.cs:123](https://github.com/EvotecIT/OfficeIMO/blob/089f66d6d97a67726fd541e10d95d86d5929ec69/OfficeIMO.Word/WordPackageSigning.cs#L123)

Gets or sets the maximum aggregate uncompressed package-part bytes digested while signing. Defaults to 512 MiB.

`public int MaxSignedReferences { get; set; }` [#](#property-maxsignedreferences)

[WordPackageSigning.cs:126](https://github.com/EvotecIT/OfficeIMO/blob/089f66d6d97a67726fd541e10d95d86d5929ec69/OfficeIMO.Word/WordPackageSigning.cs#L126)

Gets or sets the maximum authenticated XML signature references and relationship selectors created per signature. Defaults to 4,096.

`public long MaxSignatureBytes { get; set; }` [#](#property-maxsignaturebytes)

[WordPackageSigning.cs:129](https://github.com/EvotecIT/OfficeIMO/blob/089f66d6d97a67726fd541e10d95d86d5929ec69/OfficeIMO.Word/WordPackageSigning.cs#L129)

Gets or sets the maximum encoded bytes for the generated XML signature part. Defaults to 16 MiB.

`public int MaxCertificates { get; set; }` [#](#property-maxcertificates)

[WordPackageSigning.cs:132](https://github.com/EvotecIT/OfficeIMO/blob/089f66d6d97a67726fd541e10d95d86d5929ec69/OfficeIMO.Word/WordPackageSigning.cs#L132)

Gets or sets the maximum signer and additional certificates embedded in the created signature. Defaults to 64.

`public long MaxCertificateBytes { get; set; }` [#](#property-maxcertificatebytes)

[WordPackageSigning.cs:135](https://github.com/EvotecIT/OfficeIMO/blob/089f66d6d97a67726fd541e10d95d86d5929ec69/OfficeIMO.Word/WordPackageSigning.cs#L135)

Gets or sets the maximum encoded bytes for one embedded certificate. Defaults to 4 MiB.

`public long MaxTotalCertificateBytes { get; set; }` [#](#property-maxtotalcertificatebytes)

[WordPackageSigning.cs:138](https://github.com/EvotecIT/OfficeIMO/blob/089f66d6d97a67726fd541e10d95d86d5929ec69/OfficeIMO.Word/WordPackageSigning.cs#L138)

Gets or sets the maximum aggregate encoded certificate bytes embedded in the created signature. Defaults to 64 MiB.

## Fields

`public const string Sha256HashAlgorithm` [#](#field-sha256hashalgorithm)

[WordPackageSigning.cs:77](https://github.com/EvotecIT/OfficeIMO/blob/089f66d6d97a67726fd541e10d95d86d5929ec69/OfficeIMO.Word/WordPackageSigning.cs#L77)

Gets the SHA-256 XML DSig hash algorithm URI used by default.

Value: `http://www.w3.org/2001/04/xmlenc#sha256`

<!-- PowerForge markdown artifact sha256:7B712D3FAA779B25A39F5535259C5B6DD1901A53A0A1DED7A9C7F5C75493A543 -->
