IPWorks ZIP 2020 C++ Builder Edition

Questions / Feedback?

FileEncryptionAlgorithm Property

The algorithm used to encrypt the specified file written to the archive.

Syntax

__property TipzZipFileEncryptionAlgorithms FileEncryptionAlgorithm[int FileIndex] = { read=FFileEncryptionAlgorithm, write=FSetFileEncryptionAlgorithm };
enum TipzZipFileEncryptionAlgorithms { eaDefault=0, eaAESWeak=1, eaAESStrong=2, eaAESMaximum=3 };

Default Value

eaDefault

Remarks

The algorithm used to encrypt the specified file written to the archive.

Note that the file will only be encrypted if FilePassword is set. By default the component will use standard zip encryption if FilePassword is set, and will not encrypt data otherwise.

The component supports the use of AES, the Advanced Encryption Standard, as well as standard Zip encryption. The default encryption algorithm is the algorithm introduced in version 2.0 of the Zip specification, and is compatible with virtually all other zip utilities. However, this algorithm is considered weak and should not be used to protect sensitive data.

AES is a U.S. government standard cleared to protect even the most sensitive data. The file format used to create AES-encrypted files is designed to be compatible with WinZip 9.0. AES-encrypted files created by the component may or may not be compatible with other Zip utilities.

The component supports the use of AES with key lengths of 128, 192, or 256 bits. Note that even with the weakest (128-bit) keys AES is much more secure than standard Zip encryption.

If you use strong or maximum AES encryption the component will generate a unique salt value and cryptographic key for each file encrypted. If you use weak encryption the component will use the same salt for each file in the archive. If you are encrypting a large number of files this will have a substantial effect on performance. Set the AESGenerateUniqueKeys configuration setting to configure the salt generation independent of the key length.

If using AES encryption it is important to choose a good FilePassword. For 128-bit keys it is recommended that your password be 32 characters long, and for 256-bit keys, 64 characters.

Important: Note that AES encryption only encrypts the contents of encrypted files within the Zip archive; it does not prevent an attacker from reading the names of files in the archive, or from adding or deleting files to or from the archive. To prevent this consider first storing your files in an unencrypted zip file, and then storing this zip file in another, AES-encrypted zip file.

To set the FileEncryptionAlgorithm or FilePassword properties for the entire archive, use the EncryptionAlgorithm or Password properties.

Property values:

eaDefault0
eaAESWeak1
eaAESStrong2
etAESMaximum3

The FileIndex parameter specifies the index of the item in the array. The size of the array is controlled by the FileCount property.

This property is not available at design time.

Data Type

Integer

Copyright (c) 2022 /n software inc. - All rights reserved.
IPWorks ZIP 2020 C++ Builder Edition - Version 20.0 [Build 8300]