EncryptionOptions.Type Property

Gets or sets the encryption mechanism used to create a password-protected workbook.

Namespace: DevExpress.Office.Crypto

Assembly: DevExpress.Data.v21.1.dll

Declaration

public ModelEncryptionType Type { get; set; }

Property Value

Type Description
ModelEncryptionType

An enumeration member that specifies the encryption type. The default is ModelEncryptionType.Strong.

Available values:

Name Description
Compatible

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

Supported in Microsoft Excel 2007 and higher.

Strong

Agile encryption for XLSX files that uses an XML EncryptionInfo structure. The default encryption algorithm is AES-256 and SHA512 is used as a hashing algorithm. XLS files are encrypted by 40-bit RC4 encryption.

Supported in Microsoft Excel 2010 and higher.

Remarks

Use the Type property to specify the encryption type for an XLSX document. XLS files are always encrypted by the RC4 encryption algorithm.

The EncryptionOptions.Password property allows you to set an encryption password.

See Also