Holger's
Java API

com.antelmann.util
Class SimpleKey

java.lang.Object
  extended by com.antelmann.util.SimpleKey
All Implemented Interfaces:
SynchronousKey

public class SimpleKey
extends 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!)

Author:
Holger Antelmann

Constructor Summary
SimpleKey()
           
SimpleKey(int key)
           
 
Method Summary
 byte[] decode(byte[] encrypted)
          decodes the given byte array
 byte[] encode(byte[] plainSource)
          encodes the given byte array
 String getKeySignature()
          returns a signature that is used to identify the key that needs to be known for both, encoding and decoding
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimpleKey

public SimpleKey()

SimpleKey

public SimpleKey(int key)
Method Detail

decode

public byte[] decode(byte[] encrypted)
Description copied from interface: SynchronousKey
decodes the given byte array

Specified by:
decode in interface SynchronousKey

encode

public byte[] encode(byte[] plainSource)
Description copied from interface: SynchronousKey
encodes the given byte array

Specified by:
encode in interface SynchronousKey

getKeySignature

public String getKeySignature()
Description copied from interface: SynchronousKey
returns a signature that is used to identify the key that needs to be known for both, encoding and decoding

Specified by:
getKeySignature in interface SynchronousKey


(c) 2001-2006 Holger Antelmann - all rights reserved (contact: info@antelmann.com)
see www.antelmann.com/developer for further details and available downloads