import java.io.File;
import java.io.IOException;

import net.y3n20u.aeszip.AesZipEncrypter;

public class AesZipEncryptSample {

	public static void main(String[] args) {
		File destFile = new File("c:\\temp\\abc.zip");
		AesZipEncrypter zip = new AesZipEncrypter(destFile);

		zip.setProgressListener(new ProgressListenerSample());

		zip.add("abc", new File("c:\\temp\\abc"), "password");
		zip.add("abc/cde", new File("c:\\temp\\abc\\def"), "password");
		zip.add("abc/abc.txt", new File("c:\\temp\\abc\\abc.txt"), "password");
		zip.add("abc/cde.txt", new File("c:\\temp\\abc\\cde.txt"), "password");
		zip.add("abc/あいうえおかきくけこ.pdf", new File("c:\\temp\\abc\\あいうえおかきくけこ.pdf"), "password");
		try {
			zip.archive();
		} catch (IOException e) {
			destFile.delete();
			e.printStackTrace();
		}
	}
}
