Create password protected zip

7-zip and other applications allow you to “password-protected” a zip archive (using some encryption, usually AES.)

The zip erlang module unfortunately does not support this feature, as per the documentation:

The zip module supports zip archive versions up to 6.1. However, password-protection and Zip64 are not supported.

So I’m wondering what would be the best strategy to handle that:

  • is there another erlang / elixir library that would handle this ?
  • should I find the C library behind the zip exe (if opensource ?) and call it (woud ports be the right tool ?)
  • should it be possible to create the zip in erlang and encrypt it out of bound ?
  • or should I just give up on trying to do this with code, and assume a external client-line tool (zip, 7zip, etc…) is available to generate the file out of the application (using System.cmd ?)

Packages | Hex - seems like zstream has support?

I does seem to. I missed it on hex, thanks ! :man_facepalming:

1 Like

Try with zstream hex-package
https://hexdocs.pm/zstream/readme.html