|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.lang.Thread | +--cryptix.tools.Scar
A command line utility to (a) compress, encrypt and asciify files and/or directories (with or without directory recursion), and (b) accomplish the inverse with user-specified option for recreating a source tree directory.
Uses java.zip tools to deflate and inflate data, Cryptix IJCE for the cipher and message digest (used to compute cipher keys from user plain ascii passphrase) algorithms, and a PGP-style Base-64 armour with P. R. Zimmermann 24-bit CRC method (PRZ24 class) for the [de-]asciification.
Hard-wired default values for cipher (Square) and Simple String To Key (S2K) specifier with message digest (RIPEMD-160) algorithms are used. These and other default values can be individually modified for each user by setting the appropriate properties in a scar.properties file placed in the user's home directory.
Current scar properties that the user can alter are:
Copyright © 1997, 1998
Systemics Ltd on behalf of the
Cryptix Development Team.
All rights reserved.
$Revision: 1.4 $
Inner Class Summary | |
(package private) class |
Scar.ScarInputStream
|
(package private) class |
Scar.ScarOutputStream
|
Field Summary | |
(package private) static char[] |
BASE64
|
(package private) java.lang.String |
comment
Comment data. |
(package private) static int |
CONV_OTHER
|
(package private) static int |
CONV_PAD
|
(package private) static int |
CONV_WHITE
|
static boolean |
DEBUG
|
(package private) static int |
debuglevel
|
(package private) static java.lang.String |
DEFAULT_CIPHER
|
(package private) static java.lang.String |
DEFAULT_COMMENT
|
(package private) static java.lang.String |
DEFAULT_FOOTER
|
(package private) static java.lang.String |
DEFAULT_HEADER
Default default values! |
(package private) static int |
DEFAULT_ITERATIONS
|
(package private) static java.lang.String |
DEFAULT_MD
|
(package private) static java.lang.String |
DEFAULT_PASS_PHRASE
|
(package private) static java.lang.String |
DEFAULT_SALT
|
(package private) static java.io.PrintWriter |
err
|
(package private) java.lang.String |
footer
Footer info following ----- in an asciified scar file. |
(package private) static java.lang.String |
fs
User runtime jvm host file separator. |
(package private) java.lang.String |
header
Header info following ----- in an asciified scar file. |
(package private) static boolean |
IN
|
(package private) static int |
MAX_LINE_LENGTH
|
(package private) static boolean |
OUT
|
(package private) static char |
PADDING
|
(package private) java.util.PropertyResourceBundle |
properties
User ResourceBundle file for his/her scar.properties. |
(package private) static java.security.SecureRandom |
random
Source of randomness. |
(package private) static boolean |
TRACE
|
(package private) static java.lang.String |
VERSION
|
Fields inherited from class java.lang.Thread |
inheritableThreadLocals, MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY, threadLocals |
Constructor Summary | |
Scar()
|
Method Summary | |
(package private) static void |
debug(java.lang.String s)
|
(package private) void |
initDefaults()
Set default properties. |
static void |
main(java.lang.String[] args)
|
void |
processOptions(java.lang.String[] args)
Process command line arguments. |
void |
run()
main action. |
(package private) static void |
trace(boolean in,
java.lang.String s)
|
(package private) static void |
trace(java.lang.String s)
|
void |
unzip(java.util.zip.ZipInputStream zip,
java.io.File dest)
unzip files and/or directories to a destination. |
void |
zip(java.io.File source,
java.util.zip.ZipOutputStream zip,
int level)
Zip files and/or directories to a ZipOutputStream. |
Methods inherited from class java.lang.Thread |
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static boolean DEBUG
static int debuglevel
static final java.io.PrintWriter err
static final boolean TRACE
static final boolean IN
static final boolean OUT
java.util.PropertyResourceBundle properties
static java.lang.String fs
java.lang.String header
java.lang.String footer
java.lang.String comment
static final java.security.SecureRandom random
static final java.lang.String DEFAULT_HEADER
static final java.lang.String DEFAULT_FOOTER
static final java.lang.String DEFAULT_COMMENT
static final java.lang.String DEFAULT_CIPHER
static final java.lang.String DEFAULT_PASS_PHRASE
static final java.lang.String DEFAULT_MD
static final java.lang.String DEFAULT_SALT
static final int DEFAULT_ITERATIONS
static final int CONV_WHITE
static final int CONV_PAD
static final int CONV_OTHER
static final java.lang.String VERSION
static final int MAX_LINE_LENGTH
static final char[] BASE64
static final char PADDING
Constructor Detail |
public Scar()
Method Detail |
static void debug(java.lang.String s)
static void trace(boolean in, java.lang.String s)
static void trace(java.lang.String s)
public static void main(java.lang.String[] args)
void initDefaults()
public void processOptions(java.lang.String[] args)
public void run()
run
in class java.lang.Thread
public void zip(java.io.File source, java.util.zip.ZipOutputStream zip, int level) throws java.io.FileNotFoundException, java.io.IOException
source
- source file or directory.zip
- destination zip output stream.level
- depth level in the recursion tree of this method.
Used to distinguish top level directory from sub-
directories (whether to apply recursion or not).java.io.IOException
- if operation failspublic void unzip(java.util.zip.ZipInputStream zip, java.io.File dest) throws java.io.FileNotFoundException, java.io.IOException
src
- source zip stream.dest
- destination File object.java.io.IOException
- if operation fails
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |