|
Holger's Java API |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.antelmann.util.SimpleKey
public class SimpleKey
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()
|
|
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 |
|---|
public SimpleKey()
public SimpleKey(int key)
| Method Detail |
|---|
public byte[] decode(byte[] encrypted)
SynchronousKey
decode in interface SynchronousKeypublic byte[] encode(byte[] plainSource)
SynchronousKey
encode in interface SynchronousKeypublic String getKeySignature()
SynchronousKey
getKeySignature in interface SynchronousKey
|
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||