Back to Devexpress

EncryptionSettings.Type Property

officefileapi-devexpress-dot-spreadsheet-dot-encryptionsettings.md

latest3.1 KB
Original Source

EncryptionSettings.Type Property

Specifies the encryption type.

Namespace : DevExpress.Spreadsheet

Assembly : DevExpress.Spreadsheet.v25.2.Core.dll

NuGet Package : DevExpress.Spreadsheet.Core

Declaration

csharp
public EncryptionType Type { get; set; }
vb
Public Property Type As EncryptionType

Property Value

TypeDescription
EncryptionType

One of the EncryptionType enumeration values indicating the encryption type.

|

Available values:

NameDescription
Compatible

Standard encryption for Open XML files that uses a binary EncryptionInfo structure. The default encryption algorithm is AES-128 and SHA-1 is used as a hashing algorithm. Binary files (XLS) are encrypted by 40-bit RC4 encryption.

| | Strong |

Agile encryption for Open XML files that uses an XML EncryptionInfo structure. The default encryption algorithm is AES-256 and SHA512 is used as a hashing algorithm. Binary files (XLS) are encrypted by RC4 CryptoAPI encryption.

|

The following code snippets (auto-collected from DevExpress Examples) contain references to the Type property.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

office-file-api-in-web-api-app/CS/Controllers/SpreadsheetController.cs#L99

csharp
EncryptionSettings encryptionSettings = new EncryptionSettings();
encryptionSettings.Type = DevExpress.Spreadsheet.EncryptionType.Strong;
encryptionSettings.Password = password;

spreadsheet-document-api-encryption/VB/EncryptionExample/Program.vb#L20

vb
Dim encryptionOptions As EncryptionSettings = New EncryptionSettings()
encryptionOptions.Type = EncryptionType.Strong
encryptionOptions.Password = "12345"

Implements

Type

See Also

EncryptionSettings Class

EncryptionSettings Members

DevExpress.Spreadsheet Namespace