2
Vote

Bug compressing 2 files into 1 encrypted archive

description

I tried to compress 2 files into 1 archive. The first file is added with
CompressionMode = CompressionMode.Create the second file is appended with
CompressionMode = CompressionMode.Append
 
I am using the following calls to add/append the files:
 
l7z.ZipEncryptionMethod = SevenZip.ZipEncryptionMethod.Aes256
l7z.EncryptHeaders = True
l7z.CompressFilesEncrypted(lArchiveName, aPassword, lFileName)
 
(l7z is an instance of SevenZipCompressor)
(lArchiveName, aPassword and lFileName are of Type String
containing the ArchiveName, Password and FileName)
 
If I try this I get an "Invalid archive file"-errormessage for the second file to compress into the archive.
But only if I set EncryptHeaders = True.
It works fine if EncryptHeaders = False.
 
This means it is not possible to add files to an existing encrypted archive where the headers are encrypted,
or is there a different way to do that?
 
I tested this with 7z.dll version 4.65.0.0 and SevenZipSharp.dll version 0.64.3890.29348.

comments

Xt23 wrote Feb 2, 2011 at 4:46 PM

The same problem seems to be in BeginCompressFilesEncrypted.

wrote Jul 4, 2012 at 4:17 AM

wrote Feb 22, 2013 at 1:16 AM