org.jscience.util
Class SimpleKey

java.lang.Object
  extended by org.jscience.util.SimpleKey
All Implemented Interfaces:
SynchronousKey

public class SimpleKey
extends java.lang.Object
implements SynchronousKey

A very simple encryption algorithm for demonstration purposes only. It is far from being safe, but it will require anyone to at least put some manual effort into reading any message that uses Encoded objects using this algorithm when send over the Internet. (And BTW, since this is open source, it would be a BAD IDEA to use this synchronous key for anything else but a demonstration!)


Constructor Summary
SimpleKey()
          Creates a new SimpleKey object.
 
Method Summary
 byte[] decode(byte[] encrypted)
          DOCUMENT ME!
 byte[] encode(byte[] plainSource)
          DOCUMENT ME!
 java.lang.String getKeySignature()
          DOCUMENT ME!
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimpleKey

public SimpleKey()
Creates a new SimpleKey object.

Method Detail

decode

public byte[] decode(byte[] encrypted)
DOCUMENT ME!

Specified by:
decode in interface SynchronousKey
Parameters:
encrypted - DOCUMENT ME!
Returns:
DOCUMENT ME!

encode

public byte[] encode(byte[] plainSource)
DOCUMENT ME!

Specified by:
encode in interface SynchronousKey
Parameters:
plainSource - DOCUMENT ME!
Returns:
DOCUMENT ME!

getKeySignature

public java.lang.String getKeySignature()
DOCUMENT ME!

Specified by:
getKeySignature in interface SynchronousKey
Returns:
DOCUMENT ME!