You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Decryption method not supported error when remove existing zip-entry and add new zip-entry with same name in zip file. #414
I am using SharpZipLib v1.2.0.246 to zip and unzip the files with AES encryption.
Steps to reproduce
I have set the zipEntry.AESKeySize to 128 or 256
I have a zip file which contains a zip-entry i.e. 'Test.xml' file which i reads during initialization.
The Test.xml file contents is getting updated and i have to update the zip file accordingly.
To do this firstly i am removing the 'Test.xml' from zip(deleting the file) and add new entry with same name using StaticDataSource.
While doing this, the version of zip-entry is getting changed. i.e. when zip file is got created the version of zip entry was '51' but after deleting and adding new entry it became '20'. so i got the "Decryption method not supported, at ICSharpCode.SharpZipLib.Zip.ZipFile.CreateAndInitDecryptionStream(Stream baseStream, ZipEntry entry) in 'zipfilepath' "
Expected behavior
It should update zipfile with latest zip entry and should be AES encrypted.
Actual behavior
It throws exception :
ICSharpCode.SharpZipLib.Zip.ZipException: 'Decryption method not supported
at ICSharpCode.SharpZipLib.Zip.ZipFile.CreateAndInitDecryptionStream(Stream baseStream, ZipEntry entry) in C:\projects\sharpziplib\src\ICSharpCode.SharpZipLib\Zip\ZipFile.cs:line 3606
at ICSharpCode.SharpZipLib.Zip.ZipFile.GetInputStream(Int64 entryIndex) in C:\projects\sharpziplib\src\ICSharpCode.SharpZipLib\Zip\ZipFile.cs:line 867
at ICSharpCode.SharpZipLib.Zip.ZipFile.GetInputStream(ZipEntry entry) in C:\projects\sharpziplib\src\ICSharpCode.SharpZipLib\Zip\ZipFile.cs:line 835
at Knorr.DF.Zip.KBZipContainer.ExtractZipEntries(Stream str, String password, Int32 aesKeySize)
Another one related to ZipFile not supporting the creation of AES encrypted entries I guess? (related to #385, but for modifying entries rather than adding them)
Activity
Numpsy commentedon Jan 21, 2020
Another one related to ZipFile not supporting the creation of AES encrypted entries I guess? (related to #385, but for modifying entries rather than adding them)
piksel commentedon Apr 20, 2021
Yeah, it should just be a matter of throwing the same exception as in #420