zipOpenNewFileInZip3 可以加密压缩包。但是测试缺无法解压,一直密码不正确。
minizip 是基于 zlib的。 zlib不支持加解密了。 尴尬,需要换其他库了。
zlib/contrib/minizip at master · madler/zlib (github.com)
Frequently Asked Questions about zlib
How can I encrypt/decrypt zip files with zlib?
zlib doesn't support encryption. The original PKZIP encryption is very weak and can be broken with freely available programs. To get strong encryption, use GnuPG which already includes zlib compression. For PKZIP compatible "encryption", look at InfoZIP.