1 6 21 22 import de.schlichtherle.io.*; 23 import de.schlichtherle.io.File; 24 25 import java.io.*; 26 27 import javax.swing.*; 28 29 46 public class decrypt { 47 private static final nzip.ProgressMonitor progressMonitor 48 = new nzip.ProgressMonitor(); 49 50 public static void main(final String [] args) throws IOException { 51 if (args.length != 2) 52 usage(); 53 54 nzip.configKeyManager(); 55 56 if (new File(args[1]).isEntry()) 57 progressMonitor.start(); 58 59 try { 60 RaesFileUtils.decrypt(args[0], args[1], true); 61 } finally { 62 try { 64 File.umount(); 65 } finally { 66 progressMonitor.interrupt(); 67 } 68 } 69 } 70 71 private static void usage() { 72 System.err.println( 73 "decrypt (@version@)\n" + 74 "Copyright 2005-2006 Schlichtherle IT Services\n\n" + 75 "Unwraps the content from an RAES encrypted file.\n\n" + 76 "Usage: decrypt SRC DST\n\n" + 77 "where SRC is the encrypted file to unwrap and DST is the resulting content file.\n" + 78 "Please note that both files may actually be located in a ZIP file (.zip suffix)\n" + 79 "or an RAES encrypted ZIP file (.tzp suffix)."); 80 System.exit(1); 81 } 82 } 83 | Popular Tags |