cryptix.tools
public class Scar extends Thread
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 $
Nested Class Summary | |
---|---|
class | Scar.ScarInputStream |
class | Scar.ScarOutputStream |
Field Summary | |
---|---|
static char[] | BASE64 |
String | comment Comment data. |
static int | CONV_OTHER |
static int | CONV_PAD |
static int | CONV_WHITE |
static int | debuglevel |
static boolean | DEBUG |
static String | DEFAULT_CIPHER |
static String | DEFAULT_COMMENT |
static String | DEFAULT_FOOTER |
static String | DEFAULT_HEADER Default default values! |
static int | DEFAULT_ITERATIONS |
static String | DEFAULT_MD |
static String | DEFAULT_PASS_PHRASE |
static String | DEFAULT_SALT |
static PrintWriter | err |
String | footer Footer info following ----- in an asciified scar file. |
static String | fs User runtime jvm host file separator. |
String | header Header info following ----- in an asciified scar file. |
static boolean | IN |
static int | MAX_LINE_LENGTH |
static boolean | OUT |
PropertyResourceBundle | properties
User ResourceBundle file for his/her scar.properties. |
static char | PADDING |
static SecureRandom | random Source of randomness. |
static boolean | TRACE |
static String | VERSION |
Constructor Summary | |
---|---|
Scar() |
Method Summary | |
---|---|
static void | debug(String s) |
void | initDefaults() Set default properties. |
static void | main(String[] args) |
void | processOptions(String[] args) Process command line arguments. |
void | run() main action. |
static void | trace(boolean in, String s) |
static void | trace(String s) |
void | unzip(ZipInputStream zip, File dest)
unzip files and/or directories to a destination.
|
void | zip(File source, ZipOutputStream zip, int level)
Zip files and/or directories to a ZipOutputStream.
|
Parameters: src source zip stream. dest destination File object.
Throws: IOException if operation fails
Parameters: 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).
Throws: IOException if operation fails