ZLib passwords?

BlitzMax Forums/BlitzMax Programming/ZLib passwords?

Gabriel(Posted 2006) [#1]
There doesn't seem to be any way to use a password with the ZLib module. Is this simply because it only wraps the memory block functionality or is the feature not available in ZLib at all? I'm going through the ZLib manual, but I can't find anything about passwords here either.


Filax(Posted 2006) [#2]
Use ZIPEngine of gman !

http://www.gprogs.com/forum/index.php


Gabriel(Posted 2006) [#3]
ZipEngine is great, don't get me wrong, but it doesn't have everything. Specifically, it doesn't let me use a zip file like a stream when writing ( only when reading ) but ZLib *does*. I can write little bits of this and that to a bankstream without knowing how much data I'm going to put in it, then zip it with zlib and write it to disk. *BUT* I won't have a password unless there's a way to do it with ZLib.


Kurator(Posted 2006) [#4]
I'm afraid, but ZLIB does not have a Password feature


Yan(Posted 2006) [#5]
Can't you encrypt the zipped data (something like arcfour is fast and very easy to implement) then tack on a hash of the password?

Or do you need to able to open the data with an external archive tool?


Gabriel(Posted 2006) [#6]
It would be infinitely preferable if I could open the data with an external archive tool. It's not entirely essential, but I really would have preferred it.


gman(Posted 2006) [#7]
hi gabriel. do you need to be able to write incrementally via a stream or would simply being able to write once from a stream with a method like:
Method AddFile( file_data:TStream, filename:String, password:String="" )

be suitable (ie instead of the current method that writes from a file)?


gman(Posted 2006) [#8]
i went ahead and updated ZipEngine by adding AddStream() to the writer. hopefully this will help you out. if you need to stream incrementally, please let me know.