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
Try to use ZipOutputStream to create an AES encrypted entry whose compressionMethod is set to Stored.
e.g.
using (var memoryStream = new MemoryStream())
{
using (var zipStream = new ZipOutputStream(memoryStream))
{
zipStream.IsStreamOwner = false;
zipStream.Password = "password"; // optional. Null is the same as not setting. Required if using AES.
ZipEntry zipEntry = new ZipEntry("stored");
zipEntry.AESKeySize = 256;
zipEntry.DateTime = DateTime.Now;
zipEntry.CompressionMethod = CompressionMethod.Stored;
zipStream.PutNextEntry(zipEntry);
byte[] dummyData = Encoding.UTF8.GetBytes(DummyDataString);
using (var dummyStream = new MemoryStream(dummyData))
{
dummyStream.CopyTo(zipStream);
}
zipStream.CloseEntry();
}
}
Expected behavior
The entry should be added
Actual behavior
The call to CloseEntry() throws an ArgumentNullException.
Steps to reproduce
Try to use ZipOutputStream to create an AES encrypted entry whose compressionMethod is set to Stored.
e.g.
Expected behavior
The entry should be added
Actual behavior
The call to CloseEntry() throws an ArgumentNullException.
Version of SharpZipLib
Obtained from (only keep the relevant lines)
The text was updated successfully, but these errors were encountered: