import java.io.File;
import java.io.IOException;
import java.util.zip.ZipException;

import net.y3n20u.aeszip.AesZipDecrypter;
import net.y3n20u.aeszip.PasswordNotCorrectException;

public class AesZipDecryptSample {

	public static void main(String[] args) {

		File dest = new File("c:/temp/dec/");
		dest.mkdirs();

		try {
			AesZipDecrypter zipDec = new AesZipDecrypter(new File("c:/temp/abc.zip"));
			zipDec.setProgressListener(new ProgressListenerSample());
			zipDec.decryptAndExtractAllFiles(dest, "password");
		} catch (ZipException e1) {
			// TODO Auto-generated catch block
			e1.printStackTrace();
		} catch (IOException e1) {
			// TODO Auto-generated catch block
			e1.printStackTrace();
		} catch (PasswordNotCorrectException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}

		System.out.println("finished.");

	}

}
