Xceed Zip Compression Library Documentation
AES Encryption example for VB6
Example topics > AES Encryption example for VB6

This example demonstrates how to use the EncryptionMethod, EncryptionStrength, and EncryptionPassword properties to create an AES encrypted zip file. This example assumes that you have an XceedZip control named XceedZip1 added to a form.

Visual Basic Copy Code

XceedZip1.ZipFilename = "d:\files.zip"
XceedZip1.FilesToProcess = "d:\files\*"
XceedZip1.ProcessSubfolders = True  

XceedZip1.EncryptionMethod = xemWinZipAES
XceedZip1.EncryptionStrength = 192
XceedZip1.EncryptionPassword = "password"  

Dim resultCode As xcdError
resultCode = XceedZip1.Zip()  

Call MsgBox(resultCode)