j_waste.network
Class KeyInfo

java.lang.Object
  extended byj_waste.network.Packet
      extended byj_waste.network.KeyInfo

public class KeyInfo
extends Packet

This class represents the InitialPacket2 used during authentication.

Version:
0.2
Author:
Fredrik Hultin (frehul@users.sourceforge.net)

Field Summary
 
Fields inherited from class j_waste.network.Packet
packet
 
Constructor Summary
KeyInfo(byte[] p)
          Constructs a new KeyInfo packet by parsing byte array p.
KeyInfo(byte[] sKey, byte[] sIV, byte[] sRand)
          Constructs a new Keyinfo packet.
 
Method Summary
 void finalizePacket()
          Finalizes this packet.
 byte[] getSIV()
          Returns the sIV of this packet.
 byte[] getSKey()
          Returns the sKey of this packet.
 byte[] getSRand()
          Returns the sRand of this packet.
static void main(java.lang.String[] argv)
           
 byte[] toByteArray()
          Returns a byte array representation of the packet.
 
Methods inherited from class j_waste.network.Packet
padCD, reverseBytes, reverseInt, reverseShort, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

KeyInfo

public KeyInfo(byte[] sKey,
               byte[] sIV,
               byte[] sRand)
Constructs a new Keyinfo packet.

Parameters:
sKey - The blowfish session key. (56 bytes)
sRand - The sRand. (16 bytes)
sIV - The sIV.

KeyInfo

public KeyInfo(byte[] p)
Constructs a new KeyInfo packet by parsing byte array p.

Parameters:
p - The byte array to be parsed.
Method Detail

getSKey

public byte[] getSKey()
Returns the sKey of this packet.

Returns:
the sKey of this packet.

getSRand

public byte[] getSRand()
Returns the sRand of this packet.

Returns:
the sRand of this packet.

getSIV

public byte[] getSIV()
Returns the sIV of this packet.

Returns:
the sIV of this packet.

toByteArray

public byte[] toByteArray()
Returns a byte array representation of the packet.

Specified by:
toByteArray in class Packet
Returns:
a byte array representation of the packet.

finalizePacket

public void finalizePacket()
Finalizes this packet.

Specified by:
finalizePacket in class Packet

main

public static void main(java.lang.String[] argv)