HotXLS Docs

IXLSWorkBook.EncryptionType property

Unit: lxHandle
Encryption flavour applied when the workbook is saved with a password.

Syntax

property EncryptionType: TXLSEncryptionType read GetEncryptionType write SetEncryptionType

Description

Controls the encryption scheme chosen when a password is set via EncryptionPassword. xletAuto (the default) picks RC4 CryptoAPI for BIFF8 and XOR obfuscation for BIFF5. xletXor forces BIFF5 XOR obfuscation only, whilst xletRC4 forces BIFF8 RC4 standard encryption. If a non-empty password is set and the format is BIFF8, saving emits a FILEPASS record after the workbook BOF and RC4-encrypts the Workbook stream

RC4 CryptoAPI output uses a 128-bit key and names the compatible Microsoft Enhanced Cryptographic Provider in the standard header. Summary and document-summary properties are written as ordinary plaintext OLE property streams, and the encryption header sets fDocProps to record that choice. A workbook password protects workbook data; those document properties are not encrypted

Classic RC4 and RC4 CryptoAPI load and save work in the native Linux/macOS LX_PORTABLE_CORE profile as well as on Windows. This property belongs to the Classic XLS facade; encrypted OOXML output follows its own separate platform contract

See also