endtoend
Class EndtoEndServer

java.lang.Object
  |
  +--endtoend.EndtoEndServer

public class EndtoEndServer
extends java.lang.Object

EndtoEndServer is the server side implementation of the end-to-end encryption.

See the EndtoEnd class for more description of the encryption.

Version:
0.5.0.1

Constructor Summary
EndtoEndServer(java.lang.String private_key_path, java.lang.String password)
          Reads in the private key file and the password to unlock the key.
 
Method Summary
 java.lang.String done()
          Finalize the data to be returned back.
 java.util.Hashtable unpack(java.lang.String data)
          Decode, decrypt and deserialize data from the browser applet.
 void update(java.lang.String param, java.lang.String value)
          Reads in the name-value pair data that is to be encrypted.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EndtoEndServer

public EndtoEndServer(java.lang.String private_key_path,
                      java.lang.String password)
               throws EndtoEndException,
                      java.io.IOException
Reads in the private key file and the password to unlock the key.

Parameters:
private_key_path - path to the private key file generated by KeyGen.
password - password required to unlock the private key file.
Method Detail

unpack

public java.util.Hashtable unpack(java.lang.String data)
Decode, decrypt and deserialize data from the browser applet.

Parameters:
data - the encrypted String submitted by the browser.
Returns:
the hashtable of the name-value pair data submitted

update

public void update(java.lang.String param,
                   java.lang.String value)
Reads in the name-value pair data that is to be encrypted. This method can be called multiple times to append more data to return back.

Parameters:
param - name of the parameter.
value - associated data of the parameter.
See Also:
done()

done

public java.lang.String done()
Finalize the data to be returned back. The data gathered in the 'update' method are serialized, encrypted and encoded.

Returns:
the encrypted and encoded String that can be sent back to the browser.
See Also:
update(String, String)