# OdfEncryptionFailureReason

Classifies why an encrypted OpenDocument package could not be processed.

Enum 

`OfficeIMO.OpenDocument`

**Namespace**

`OfficeIMO.OpenDocument`

**Assembly**

`OfficeIMO.OpenDocument`

**Source revision**

`5e5a2dda74b3` with working tree changes

**Source**

[OdfEncryptionFailureReason.cs:4](https://github.com/EvotecIT/OfficeIMO/blob/5e5a2dda74b33242f1f075718ee568bb355c03ba/OfficeIMO.OpenDocument/Security/OdfEncryptionFailureReason.cs#L4)

**Base**

`Enum`

**Implements**

`IComparable` `ISpanFormattable` `IFormattable` `IConvertible`

**Modifiers**

sealed

Classifies why an encrypted OpenDocument package could not be processed.

## Inheritance

- Enum
- OdfEncryptionFailureReason

## Usage

Explore 8 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.

### Returned or exposed by 7

- Property [OdfEncryptedPackageException.Reason](/api/open-document/officeimo-opendocument-odfencryptedpackageexception/#property-reason)
- Field [OdfEncryptionFailureReason.IncorrectPassword](/api/open-document/officeimo-opendocument-odfencryptionfailurereason/#field-incorrectpassword)
- Field [OdfEncryptionFailureReason.InvalidEncryptedPackage](/api/open-document/officeimo-opendocument-odfencryptionfailurereason/#field-invalidencryptedpackage)
- Field [OdfEncryptionFailureReason.PasswordRequired](/api/open-document/officeimo-opendocument-odfencryptionfailurereason/#field-passwordrequired)
- Field [OdfEncryptionFailureReason.PreservationRequired](/api/open-document/officeimo-opendocument-odfencryptionfailurereason/#field-preservationrequired)
- Field [OdfEncryptionFailureReason.ResourceLimitExceeded](/api/open-document/officeimo-opendocument-odfencryptionfailurereason/#field-resourcelimitexceeded)
- Field [OdfEncryptionFailureReason.UnsupportedProfile](/api/open-document/officeimo-opendocument-odfencryptionfailurereason/#field-unsupportedprofile)

### Accepted by parameters 1

- Constructor [OdfEncryptedPackageException.OdfEncryptedPackageException](/api/open-document/officeimo-opendocument-odfencryptedpackageexception/#constructor-ctor-string-officeimo-opendocument-odfencryptionfailurereason-string-exception) parameter `reason`

Filter members 

Show inherited

## Inherited Methods

`public int CompareTo(object? target)` [#](#method-compareto-object)

Inherited from Enum

Parameters

**target object? required**

Returns

`int`

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

Inherited from Enum

Parameters

**obj object? required**

Returns

`bool`

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

Inherited from Enum

Returns

`int`

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

Inherited from object

Returns

`Type`

`public TypeCode GetTypeCode()` [#](#method-gettypecode)

Inherited from Enum

Returns

`TypeCode`

`public bool HasFlag(Enum flag)` [#](#method-hasflag-enum)

Inherited from Enum

Parameters

**flag Enum required**

Returns

`bool`

ToString 4 overloads

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

Inherited from Enum

Returns

`string`

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

Inherited from Enum

Parameters

**format string? required**

Returns

`string`

`public string ToString(IFormatProvider? provider)` [#](#method-tostring-iformatprovider)

Inherited from Enum

`Obsolete("The provider argument is not used. Use ToString() instead.")`

Parameters

**provider IFormatProvider? required**

Returns

`string`

`public string ToString(string? format, IFormatProvider? provider)` [#](#method-tostring-string-iformatprovider)

Inherited from Enum

`Obsolete("The provider argument is not used. Use ToString(String) instead.")`

Parameters

**format string? required**

**provider IFormatProvider? required**

Returns

`string`

## Values

`public const OdfEncryptionFailureReason PasswordRequired` [#](#field-passwordrequired)

[OdfEncryptionFailureReason.cs:6](https://github.com/EvotecIT/OfficeIMO/blob/5e5a2dda74b33242f1f075718ee568bb355c03ba/OfficeIMO.OpenDocument/Security/OdfEncryptionFailureReason.cs#L6)

No password was supplied.

Value: `0`

`public const OdfEncryptionFailureReason IncorrectPassword` [#](#field-incorrectpassword)

[OdfEncryptionFailureReason.cs:8](https://github.com/EvotecIT/OfficeIMO/blob/5e5a2dda74b33242f1f075718ee568bb355c03ba/OfficeIMO.OpenDocument/Security/OdfEncryptionFailureReason.cs#L8)

The supplied password did not match the package checksum.

Value: `1`

`public const OdfEncryptionFailureReason UnsupportedProfile` [#](#field-unsupportedprofile)

[OdfEncryptionFailureReason.cs:10](https://github.com/EvotecIT/OfficeIMO/blob/5e5a2dda74b33242f1f075718ee568bb355c03ba/OfficeIMO.OpenDocument/Security/OdfEncryptionFailureReason.cs#L10)

The package uses an encryption profile that this version does not implement.

Value: `2`

`public const OdfEncryptionFailureReason InvalidEncryptedPackage` [#](#field-invalidencryptedpackage)

[OdfEncryptionFailureReason.cs:12](https://github.com/EvotecIT/OfficeIMO/blob/5e5a2dda74b33242f1f075718ee568bb355c03ba/OfficeIMO.OpenDocument/Security/OdfEncryptionFailureReason.cs#L12)

The encryption metadata or encrypted payload is malformed.

Value: `3`

`public const OdfEncryptionFailureReason ResourceLimitExceeded` [#](#field-resourcelimitexceeded)

[OdfEncryptionFailureReason.cs:14](https://github.com/EvotecIT/OfficeIMO/blob/5e5a2dda74b33242f1f075718ee568bb355c03ba/OfficeIMO.OpenDocument/Security/OdfEncryptionFailureReason.cs#L14)

Decrypted content would exceed the configured resource budget.

Value: `4`

`public const OdfEncryptionFailureReason PreservationRequired` [#](#field-preservationrequired)

[OdfEncryptionFailureReason.cs:16](https://github.com/EvotecIT/OfficeIMO/blob/5e5a2dda74b33242f1f075718ee568bb355c03ba/OfficeIMO.OpenDocument/Security/OdfEncryptionFailureReason.cs#L16)

Saving would remove source encryption without explicit authorization.

Value: `5`

<!-- PowerForge markdown artifact sha256:D3BA07A9F7D12F56B21866995AC4C61BB948F078AF1BB7D56BF57653F807B66C -->
