With a zip file you can only encrypt the entries' data - so you can still see all file names.
With rar and 7z (and maybe others) you can encrypt the data and - optionally - the file name.
Behavior when getting blocks for an entry via entry.get_blocks():
Encrypted zip:
ERROR: Passphrase required for this entry (errno=-1, retcode=-25, archive_p=1880656)
Encrypted rar / file names not encrypted:
NO ERROR. Returned encrypted bytes (I presume it's the encrypted data at least, did not verify)
Encrypted 7z / file names not encrypted:
ERROR: The file content is encrypted, but currently not supported (errno=-1, retcode=-30, archive_p=6593280)
Encrypted rar / file names encrypted:
ERROR. Fails when opening the archive with Encryption is not supported (errno=42, retcode=-30, archive_p=4559952)
Encrypted 7z / file names encrypted:
ERROR. Fails when opening the archive but with different error than for rar: The archive header is encrypted, but currently not supported (errno=-1, retcode=-30, archive_p=5805136)
With a zip file you can only encrypt the entries' data - so you can still see all file names.
With rar and 7z (and maybe others) you can encrypt the data and - optionally - the file name.
Behavior when getting blocks for an entry via
entry.get_blocks()
:Encrypted zip:
Passphrase required for this entry (errno=-1, retcode=-25, archive_p=1880656)
Encrypted rar / file names not encrypted:
Encrypted 7z / file names not encrypted:
The file content is encrypted, but currently not supported (errno=-1, retcode=-30, archive_p=6593280)
Encrypted rar / file names encrypted:
Encryption is not supported (errno=42, retcode=-30, archive_p=4559952)
Encrypted 7z / file names encrypted:
The archive header is encrypted, but currently not supported (errno=-1, retcode=-30, archive_p=5805136)
EDIT: It's probably some libarchive issue, yes?