|
SPT Core API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.sptci.util.XOREncrypt
public class XOREncrypt
A simple encrypter using the popular XOR technique.
© Copyright 2008 Sans Pareil Technologies, Inc.
| Constructor Summary | |
|---|---|
XOREncrypt()
Create a new encrypter instance using the default encryption key. |
|
XOREncrypt(String key)
Create a new encrypter instance using the specified key to encrypt or decrypt data. |
|
| Method Summary | |
|---|---|
protected byte[] |
crypt(byte[] value)
|
String |
decrypt(byte[] value)
Decrypt the encrypted value and return the original string value. |
byte[] |
encrypt(String value)
Encrypt the specified string and return the array of bytes that represents the encrypted value. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public XOREncrypt()
public XOREncrypt(String key)
key - The key to use.| Method Detail |
|---|
public byte[] encrypt(String value)
value - The value to be encrypted.
crypt(byte[])public String decrypt(byte[] value)
value - The encrypted bytes that are to be reconstituted.
protected byte[] crypt(byte[] value)
|
SPT Core API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||