j_waste.network
Class Authenticate

java.lang.Object
  extended byj_waste.network.Authenticate

public class Authenticate
extends java.lang.Object

This is class handles the authentication.

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

Constructor Summary
Authenticate(Connection c)
          Constructs a new Authenticate object.
 
Method Summary
 boolean doAuthenticate(byte[] input)
          This method will handle authentication when someone wants to connect to this computer.
 boolean initiateAuthentication()
          This method initiates a new WASTE connection on the connection that was sent to the constructor of this class.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Authenticate

public Authenticate(Connection c)
Constructs a new Authenticate object.

Parameters:
c - The Connection object from which Authenticate is called.
Method Detail

initiateAuthentication

public boolean initiateAuthentication()
This method initiates a new WASTE connection on the connection that was sent to the constructor of this class.

Returns:
Returns true if the authentication was succesfull, otherwise false if an error occurred.

doAuthenticate

public boolean doAuthenticate(byte[] input)
This method will handle authentication when someone wants to connect to this computer.

Parameters:
input - The InitialPacket1 that has already been was recieved.
Returns:
Returns true if the authentication was succesfull, otherwise false if an error occured.