wqweto / ZipArchive

A single-class pure VB6 library for zip with ASM speed
MIT License
52 stars 22 forks source link

Zip with password is failed #16

Closed cyberzilla closed 3 years ago

cyberzilla commented 3 years ago

I have create zip file from folder like code below, the zip file is successfully created, but with no password

Dim Zip As New cZipArchive
With Zip
    .AddFromFolder App.Path & "\test\*.*", Recursive:=True, TargetFolder:="test", IncludeEmptyFolders:=True, Password:="test123"
    .CompressArchive App.Path & "\test.zip"
End With

Please help @wqweto

Regards

wqweto commented 3 years ago

Crypto support is not enabled by default to reduce class footprint in final executable. In project properties dialog try setting ZIP_CRYPTO = 1 in conditional compilation setting like this

image

Keep in mind that by default cZipArchive uses the weaker ZipCrypto encryption to be most compatible with Windows Explorer but this can easily be cracked. You can try setting EncrStrength parameter to 1, 2 or 3 for stronger AES based encryption which is compatible with WinZip, 7-zip and almost every other zip utility except Windows Explorer.

cyberzilla commented 3 years ago

ow...hahaha, thanks for this great project @wqweto