gnu.cajo.utils.extra
Class HashedProxy

java.lang.Object
  extended by gnu.cajo.utils.ZippedProxy
      extended by gnu.cajo.utils.extra.HashedProxy
All Implemented Interfaces:
Invoke, java.io.Serializable

public class HashedProxy
extends ZippedProxy

This class is used to hash a ZippedProxy. Primarily it is intended to simply and quickly convert the serialized proxy representation in to, and out of plaintext, for transmission over the network. It should be noted that the default hashing algorithm is not cryptographically strong. (The author lives in the United States and doesn't want to go to jail) It's purpose is to provide a simple example encryption, which could be sufficient for many purposes. It can always be subclassed, to employ much more sophisticated cryptography. ;-)

The underlying paradigm is that rather than incurring the extensive computational overhead of running encrypted streams between clients and servers, it much more efficient to encrypt only those specific objects containing sensitive information. It is even stronger than conventional encrypted streams in that each object can employ different cryptography. If the client and the server both have the derived class in their local codebases; it is possible to employ 'pad' (i.e. uncrackable) cyphers.

Version:
1.0, 01-Nov-99 Initial release
Author:
John Catherino
See Also:
Serialized Form

Field Summary
protected  boolean hashed
          A flag to indicate if the payload has been hashed.
 
Fields inherited from class gnu.cajo.utils.ZippedProxy
payload, proxy
 
Constructor Summary
HashedProxy(java.lang.Object proxy)
          The constructor simply invokes the superclass ZippedProxy constructor.
 
Method Summary
protected  void hashPayload()
          A symetric hash algorithm, to convolve the array in to and out of plain text.
 
Methods inherited from class gnu.cajo.utils.ZippedProxy
invoke
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

hashed

protected transient boolean hashed
A flag to indicate if the payload has been hashed. To reduce overhead, the payload is hashed only once per session.

Constructor Detail

HashedProxy

public HashedProxy(java.lang.Object proxy)
The constructor simply invokes the superclass ZippedProxy constructor.

Parameters:
proxy - The client proxy object, to be hashed at the server, and unhashed at the client.
Method Detail

hashPayload

protected void hashPayload()
A symetric hash algorithm, to convolve the array in to and out of plain text. It is invoked once at the sending VM, then once at the receiving VM.