Back to Devexpress

ZipItem.EncryptionType Property

officefileapi-devexpress-dot-compression-dot-zipitem.md

latest3.2 KB
Original Source

ZipItem.EncryptionType Property

Gets or sets the encryption type for the zip item.

Namespace : DevExpress.Compression

Assembly : DevExpress.Docs.v25.2.dll

NuGet Package : DevExpress.Document.Processor

Declaration

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

Property Value

TypeDescription
EncryptionType

An EncryptionType enumeration member specifying the encryption type. Default is EncryptionType.None.

|

Available values:

NameDescription
None

Do not use encryption.

| | PkZip |

Use the PKZIP encryption algorithm.

| | Aes128 |

Use the Advanced Encryption Standard (AES) cryptographic with keys that are 128 bits long.

| | Aes192 |

Use the Advanced Encryption Standard (AES) cryptographic with keys that are 192 bits long.

| | Aes256 |

Use the Advanced Encryption Standard (AES) cryptographic with keys that are 256 bits long.

|

Remarks

When a password is set for the zip item, the encryption type is automatically set to EncryptionType.PkZip.

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the EncryptionType 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.

zip-compression-and-archive-api-examples/CS/CompressionLibraryExamples/ZipExamples.cs#L132

csharp
ZipFileItem zipFI = archive.AddFile(file, "/");
zipFI.EncryptionType = EncryptionType.Aes128;
zipFI.Password = password;

zip-compression-and-archive-api-examples/VB/CompressionLibraryExamples/ZipExamples.vb#L137

vb
Dim zipFI As ZipFileItem = archive.AddFile(file, "/")
zipFI.EncryptionType = EncryptionType.Aes128
zipFI.Password = password

See Also

ZipItem Class

ZipItem Members

DevExpress.Compression Namespace