Encrypt Decrypt Zip (Unzip)

Download it here v0.1.6 (MD5: 2314D911CEAD44D711B565957C5A3F2B)

Source code here

I've created a simple Java command-line application that will zip a file or files and password protect it. Furthermore, the application will rename the files and store the original name and directory structure in an additional file in the zip file. The password can either be supplied as a command line parameter or a path to a password file. The password file can be generated using the same application. The same password file must be used for encrypting as well as decrypting. The application will pick a random password from the password file. An index of the password used, in the password file, will be encoded in the zip file name.

Srikanth Reddy Lingala's Zip4j zip library is used to zip the files. AES is used to password encrypt the zip file, the key strength for AES is set to 256 bit. Is it secure? There is no back-door build into EncDecZip, thus if you lose the Password file (or forget the password) then there is no way to recover the files.

To run the application is rather simple. On the command line, just type java -jar EncDecZip -h to get the help screen:


java -jar EncDecZip [-z | -u] [-l level] [-h] [-o textOutput] {[-p password | -pf passwordFile | -pg]} [inPath] <outPath>
-z Zip the file or directory, not needed for -pg
-u Unzip the file or directory, not needed for -pg
-l level Log / output level:
ERROR Log out only program error events
WARNING Log out ERROR and user related warnings
INFO Log out ERROR, WARNING and informational messages - this is the default logging level
VERBOSE Log out all errors, warnings, info and much more
-h Help, this information o.O
-o Output text before filename, e.g. http://download.from
-p password The password to encrypt the file, cannot contain spaces. Consider only using standard characters to prevent platform issues
-pf passwordFile The path to the password file (including the file name)
-pg Generate a password file to the output path
in/path The input file or directory, needed for zip or unzip
Zipping If the path is directory then all files and subdirectories will be included reclusively Wildcard characters * or ? can be used but subdirectories will not be traverse. Put path in "" when using wildcards
Unzipping It must be a path to a file. The file name must start with '_'
out/path [MANDATORY] The output file or directory.
Password Gen If path is to a directory then the file 'Passwords.txt' will be created in that directory
Zipping If path is to a directory then the zip file name will be the Unix time stamp, in Hex. If the path includes a file name then a sequence starting with '_' will added to the start of the file name
Unzipping The path must be a directory
Thank you for choosing EncDecZip, we hope you enjoy it.
source @ github.com/TungstenX/EncDecZip