net.cjb.teutoburgo.otp4u.crypt
Class KM_Xor

java.lang.Object
  |
  +--net.cjb.teutoburgo.otp4u.crypt.KeyManager
        |
        +--net.cjb.teutoburgo.otp4u.crypt.KM_Xor

public class KM_Xor
extends KeyManager

Title: OTP4U Description: Copyright: Copyright (c) 2002 Company: Teutoburgo

Version:
1.0
Author:
Pierre Blanc

Field Summary
(package private)  java.lang.String ERROR_XOR
           
 
Fields inherited from class net.cjb.teutoburgo.otp4u.crypt.KeyManager
ENTROPY, io, isGui, KEY4KEY, KEY4KEY_FILE, mp, OTP4U_HOME, PUBLIC_KEY, PUBLIC_KEY_FILE, RANDOM_KEY, RANDOM_KEY_FILE, xor
 
Constructor Summary
KM_Xor()
           
KM_Xor(java.lang.String home, java.lang.Boolean isGui)
           
 
Method Summary
 byte[] autoKey(byte[] x, byte[] y)
          Returns a new byte[] of the same length of the parameters
 byte[] getKey4Key(byte[] y, byte[] oldKey4Key)
           
 byte[] getKey4Message(byte[] key4key, byte[] r0R)
           
 void writePublicKey()
           
 void writeRandomAndK4K(byte[] randomKeyBytes, byte[] oldKey4Key)
           
 void writeRandomKey()
           
 
Methods inherited from class net.cjb.teutoburgo.otp4u.crypt.KeyManager
compactEntropyFiles
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ERROR_XOR

java.lang.String ERROR_XOR
Constructor Detail

KM_Xor

public KM_Xor()

KM_Xor

public KM_Xor(java.lang.String home,
              java.lang.Boolean isGui)
Method Detail

writeRandomKey

public void writeRandomKey()
                    throws java.io.IOException,
                           java.io.FileNotFoundException
Overrides:
writeRandomKey in class KeyManager

writePublicKey

public void writePublicKey()
                    throws java.io.IOException,
                           java.io.FileNotFoundException
Overrides:
writePublicKey in class KeyManager

getKey4Key

public byte[] getKey4Key(byte[] y,
                         byte[] oldKey4Key)
                  throws java.io.IOException

writeRandomAndK4K

public void writeRandomAndK4K(byte[] randomKeyBytes,
                              byte[] oldKey4Key)

autoKey

public byte[] autoKey(byte[] x,
                      byte[] y)
Returns a new byte[] of the same length of the parameters
Parameters:
x,y - random byte[]

getKey4Message

public byte[] getKey4Message(byte[] key4key,
                             byte[] r0R)