Page 1 of 1

Create password protected zipfile

PostPosted: Tue Sep 15, 2020 5:28 pm
by wouter
Hi,

I am looking for a solution to create a password protected zip-file. My solution creates a file that is send as an attachment to a external email-address outside my direct control. The attached file contains sensitive information and the file needs to be protected.

I know how to create a zipfile using the svyUtils scope, but this will not put a password on the file. Anybody have a good idea/best practice to get this done? There are u number of options here where I encrypt the file before compressing it but I am looking for an elegant solution that does not burden the receiving system with too much added complexity.


Any help or tips would be appreciated.

W.

Re: Create password protected zipfile

PostPosted: Tue Sep 15, 2020 6:18 pm
by sean
Hi Wouter,

The svyUtils extension is based on what is available in the base Java Runtime (JRE>java.uitl.zip).
Also, standard zip encryption is weak and easily hacked.

This can be done with a 3rd-party, open-source java lib, zip4j.
There is an article about it here.

Java can be executed directly in Servoy's code editor (with a little classpath prefixing).

Also, you would have to include the binary distribution in your classpath (i.e. servoy plugins folder)

Hope this helps.
Sean