|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--superwaba.ext.xplat.util.crypto.BlowfishECB
Implementation of the Blowfish encryption algorithm in ECB mode
| Field Summary | |
static int |
BLOCKSIZE
block size of this cipher (in bytes) |
static int |
MAXKEYLENGTH
maximum possible key length |
| Constructor Summary | |
BlowfishECB(byte[] bfkey)
default constructor |
|
BlowfishECB(java.lang.String key)
|
|
| Method Summary | |
void |
cleanUp()
to clear data in the boxes before an instance is freed |
void |
decrypt(byte[] buffer)
decrypts a byte buffer (should be aligned to an 8 byte border) to itself |
void |
decrypt(byte[] inbuffer,
byte[] outbuffer)
decrypts a byte buffer (should be aligned to an 8 byte border) to another byte buffer (of the same size or bigger) |
void |
decrypt(int[] buffer)
decrypts an int buffer (should be aligned to an two integer border) |
void |
decrypt(int[] inbuffer,
int[] outbuffer)
decrypts an integer buffer (should be aligned to an two integer border) to another int buffer (of the same size or bigger) |
void |
decrypt(long[] buffer)
decrypts a long buffer to itself |
void |
decrypt(long[] inbuffer,
long[] outbuffer)
decrypts a long buffer to another long buffer (of the same size or bigger) |
java.lang.String |
decrypt(java.lang.String value)
Decrypts the given String via the Blowfish algorithm that was encrypted with the encrypt(String) method. |
protected long |
decryptBlock(long lCipherBlock)
|
void |
encrypt(byte[] buffer)
encrypts a byte buffer (should be aligned to an 8 byte border) to itself |
void |
encrypt(byte[] inbuffer,
byte[] outbuffer)
encrypts a byte buffer (should be aligned to an 8 byte border) to another buffer (of the same size or bigger) |
void |
encrypt(int[] buffer)
encrypts an int buffer (should be aligned to a two integer border) |
void |
encrypt(int[] inbuffer,
int[] outbuffer)
encrypts an integer buffer (should be aligned to an two integer border) to another int buffer (of the same size or bigger) |
void |
encrypt(long[] buffer)
encrypts a long buffer to itself |
void |
encrypt(long[] inbuffer,
long[] outbuffer)
encrypts a long buffer to another long buffer (of the same size or bigger) |
java.lang.String |
encrypt(java.lang.String value)
Encrypts the given String with the Blowfish algorithm. |
protected long |
encryptBlock(long lPlainBlock)
selftest routine, to check e.g. for a valid class file transmission |
static int |
hex2unsigned(char[] chars,
int offset)
|
| Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
| Field Detail |
public static final int MAXKEYLENGTH
public static final int BLOCKSIZE
| Constructor Detail |
public BlowfishECB(java.lang.String key)
public BlowfishECB(byte[] bfkey)
bfkey - key material, up to MAXKEYLENGTH bytes| Method Detail |
public void cleanUp()
protected long encryptBlock(long lPlainBlock)
protected long decryptBlock(long lCipherBlock)
public void encrypt(byte[] inbuffer,
byte[] outbuffer)
inbuffer - buffer with plaintext dataoutbuffer - buffer to get the ciphertext datapublic void encrypt(byte[] buffer)
buffer - buffer to encrypt
public void encrypt(int[] inbuffer,
int[] outbuffer)
inbuffer - buffer with plaintext dataoutbuffer - buffer to get the ciphertext datapublic void encrypt(int[] buffer)
buffer - buffer to encrypt
public void encrypt(long[] inbuffer,
long[] outbuffer)
inbuffer - buffer with plaintext dataoutbuffer - buffer to get the ciphertext datapublic void encrypt(long[] buffer)
buffer - buffer to encrypt
public void decrypt(byte[] inbuffer,
byte[] outbuffer)
inbuffer - buffer with ciphertext dataoutbuffer - buffer to get the plaintext datapublic void decrypt(byte[] buffer)
buffer - buffer to decrypt
public void decrypt(int[] inbuffer,
int[] outbuffer)
inbuffer - buffer with ciphertext dataoutbuffer - buffer to get the plaintext datapublic void decrypt(int[] buffer)
buffer - buffer to decrypt
public void decrypt(long[] inbuffer,
long[] outbuffer)
inbuffer - buffer with ciphertext dataoutbuffer - buffer to get the plaintext datapublic void decrypt(long[] buffer)
buffer - buffer to decryptpublic java.lang.String encrypt(java.lang.String value)
decrypt(String)
method.value - The String to encryptvaluepublic java.lang.String decrypt(java.lang.String value)
encrypt(String) method.value - The String to decrypt, stored as sequences of 32 bit hexadecimal integers.value
public static int hex2unsigned(char[] chars,
int offset)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||