Create password protected zipfile

Questions and answers on designing your Servoy solutions, database modelling and other 'how do I do this' that don't fit in any of the other categories

Create password protected zipfile

Postby wouter » Tue Sep 15, 2020 5:28 pm

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.
User avatar
wouter
 
Posts: 17
Joined: Mon Jul 23, 2012 1:17 pm

Re: Create password protected zipfile

Postby sean » Tue Sep 15, 2020 6:18 pm

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
Software Engineer
Servoy USA
sean
 
Posts: 242
Joined: Mon May 21, 2007 6:26 pm
Location: USA


Return to Programming with Servoy

Who is online

Users browsing this forum: No registered users and 4 guests

cron