|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--net.cjb.teutoburgo.otp4u.application.OTP4U
Title: OTP4U
Description: The main class for the command-line application OTP4U (One Time Pad for you)
Copyright: Copyright (c) Pierre Blanc 2003
Company: Teutoburgo
Field Summary | |
static java.lang.String |
badParameter
|
static java.lang.String |
CFG_FILE
|
(package private) Cipher |
cipher
|
static java.lang.String |
CIPHER
|
static java.lang.String |
CONFIG
|
static java.lang.String |
ENTROPY
|
(package private) Io |
io
|
static java.lang.String |
KEY_SMALL
|
static java.lang.String |
KEY4KEY
|
static java.lang.String |
KEY4KEY_FILE
|
(package private) KeyManager |
keyManager
|
(package private) MessagesPrinter |
mp
|
static java.lang.String |
OTP4U_HOME
|
static java.lang.String |
PLAIN
|
static java.lang.String |
PSEUDO_RANDOM
|
static java.lang.String |
PUBLIC_KEY
|
static java.lang.String |
PUBLIC_KEY_FILE
|
static java.lang.String |
RANDOM_KEY
|
static java.lang.String |
RANDOM_KEY_FILE
|
(package private) RandomGenerator |
rg
|
static java.lang.String |
SEPARATOR
|
(package private) Xor |
xor
|
Constructor Summary | |
OTP4U()
OTP4U constructor comment. |
|
OTP4U(boolean isGUI)
|
Method Summary | |
void |
doDecryption(java.lang.String pathName)
Performs decryption if the files of ciphertext and randomKey are found Writes the plaintext array in its directory |
void |
doEncryption(java.lang.String pathName)
Performs encryption if the files of plaintext and randomKey are found Writes the ciphertext array ciphertext in its directory |
void |
generateRandomFile(java.lang.String pathName,
java.lang.String fileName,
int length)
Used to generate a PSEUDO-random file in the entropySource directory or in the key4key directory. |
java.lang.String |
getDefaultFile()
|
int |
getDefaultLength()
|
int |
getRandomKeySize()
|
byte[][] |
initArrays(java.lang.String pathName)
|
static void |
main(java.lang.String[] args)
|
void |
otp4uInit(java.lang.String fileName)
Used by the contructor and by a GUI method to load the properties in the configuration file |
void |
writePublicKey()
Used to write the "public" key |
void |
writeRandomKey()
Used to write the random key (composed of K4Kn and K4Mn) |
Methods inherited from class java.lang.Object |
|
Field Detail |
public static java.lang.String OTP4U_HOME
public static final java.lang.String SEPARATOR
public static final java.lang.String PUBLIC_KEY_FILE
public static final java.lang.String CFG_FILE
public static final java.lang.String RANDOM_KEY_FILE
public static final java.lang.String CIPHER
public static final java.lang.String KEY_SMALL
public static final java.lang.String PLAIN
public static final java.lang.String RANDOM_KEY
public static final java.lang.String PUBLIC_KEY
public static final java.lang.String ENTROPY
public static final java.lang.String KEY4KEY
public static final java.lang.String KEY4KEY_FILE
public static final java.lang.String PSEUDO_RANDOM
public static final java.lang.String badParameter
public static final java.lang.String CONFIG
KeyManager keyManager
Xor xor
Io io
Cipher cipher
MessagesPrinter mp
RandomGenerator rg
Constructor Detail |
public OTP4U()
public OTP4U(boolean isGUI)
Method Detail |
public void otp4uInit(java.lang.String fileName) throws java.io.FileNotFoundException, java.lang.IllegalArgumentException, java.io.IOException, java.lang.NumberFormatException, java.lang.ClassNotFoundException, java.lang.NoSuchMethodException, java.lang.Exception
fileName
- the name of the configuration filepublic void generateRandomFile(java.lang.String pathName, java.lang.String fileName, int length)
pathName
- the path name of the pseudo-random filefileName
- the file namelength
- the file lengthpublic void doDecryption(java.lang.String pathName)
pathName
- The pathName of the ciphertextpublic void doEncryption(java.lang.String pathName)
pathName
- The pathname of the plaintextpublic java.lang.String getDefaultFile()
public int getDefaultLength()
public int getRandomKeySize()
public byte[][] initArrays(java.lang.String pathName) throws java.io.IOException
public static void main(java.lang.String[] args)
public void writePublicKey()
public void writeRandomKey()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |