package de.duehl.zipwithzip4j.start.zip;

import de.duehl.basics.io.FileHelper;
import de.duehl.basics.io.zip.data.ZipArchive;
import de.duehl.zipwithzip4j.zip.ZipWithZip4J;

public class ZipTestZipFolderWithPassword {

    public static void main(String[] args) {
        String dir = "c:\\temp\\zip4j_test_1";

        String zipFilename = FileHelper.concatPathes(dir,
                "daten_per_Programm_verpackt_mit_Paswort_2.zip");
        String directoryToZip = FileHelper.concatPathes(dir, "daten");

        String password = "Geheim";

        ZipArchive zipArchive = new ZipArchive(zipFilename, directoryToZip);
        ZipWithZip4J zip = new ZipWithZip4J(zipArchive);
        zip.cypher(password);
        zip.zip();
    }

}
