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
Define a simple data source that implements the IStaticDataSource interface:
publicclassCustomStaticDataSource:IStaticDataSource{privateStream_stream;// Implement method from IStaticDataSourcepublicStreamGetSource(){return_stream;}// Call this to provide the memorystreampublicvoidSetStream(StreaminputStream){_stream=inputStream;_stream.Position=0;}}
Use this data source to add a new ZIP entry to a ZipFile whose password is set using this method:
@piksel As long as ZipFile doesn't support the creation of entries with AES encryption, would it be better if the (IStaticDataSource dataSource, ZipEntry entry) version of Add threw when you tried to add such an entry instead of silently not using AES?
I am closing this as it should have been fixed by #420. Note that ZipFile still doesn't support AES, but at least now it won't silently use another encryption.
Activity
Numpsy commentedon Sep 26, 2019
ZipFile is missing some pieces it needs to support AES encryption of entries (was it actually possible to request it to prior to 1.2.0?).
I started looking at filling in the holes, but haven't had time to get it done.
Numpsy commentedon Feb 5, 2020
@piksel As long as ZipFile doesn't support the creation of entries with AES encryption, would it be better if the (IStaticDataSource dataSource, ZipEntry entry) version of Add threw when you tried to add such an entry instead of silently not using AES?
piksel commentedon Feb 6, 2020
Yeah, I agree.
piksel commentedon Nov 10, 2020
I am closing this as it should have been fixed by #420. Note that ZipFile still doesn't support AES, but at least now it won't silently use another encryption.