|
|||||||||
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 | +--superwaba.ext.xplat.util.crypto.BlowfishCBC
Implementation of the Blowfish encryption algorithm in CBC mode
Fields inherited from class superwaba.ext.xplat.util.crypto.BlowfishECB |
BLOCKSIZE,
MAXKEYLENGTH |
Constructor Summary | |
BlowfishCBC(byte[] bfkey)
constructor, stores a zero CBC IV |
|
BlowfishCBC(byte[] bfkey,
byte[] initCBCIV)
constructor |
|
BlowfishCBC(byte[] bfkey,
long lInitCBCIV)
constructor |
Method Summary | |
void |
cleanUp()
cleans up all critical internals, call this if you don't need an instance anymore |
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 buffer (of the same size or bigger) |
void |
decrypt(int[] buffer)
decrypts an int buffer (should be aligned to a 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) |
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 integer buffer |
void |
encrypt(int[] inbuffer,
int[] outbuffer)
encrypts an int 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) |
long |
getCBCIV()
get the current CBC IV (for cipher resets) |
void |
getCBCIV(byte[] dest)
get the current CBC IV (for cipher resets) |
void |
setCBCIV(byte[] newCBCIV)
set the current CBC IV (for cipher resets) |
void |
setCBCIV(long lNewCBCIV)
set the current CBC IV (for cipher resets) |
Methods inherited from class superwaba.ext.xplat.util.crypto.BlowfishECB |
decryptBlock,
encryptBlock,
selfTest |
Methods inherited from class java.lang.Object |
equals,
getClass,
hashCode,
notify,
toString,
wait,
wait |
Constructor Detail |
public BlowfishCBC(byte[] bfkey)
bfkey
- key material, up to MAXKEYLENGTH bytespublic BlowfishCBC(byte[] bfkey, long lInitCBCIV)
bfkey
- key material, up to MAXKEYLENGTH byteslInitCBCIV
- the CBC IVpublic BlowfishCBC(byte[] bfkey, byte[] initCBCIV)
bfkey
- key material, up to MAXKEYLENGTH byteslInitCBCIV
- the CBC IV (array with min. BLOCKSIZE bytes)Method Detail |
public long getCBCIV()
public void getCBCIV(byte[] dest)
dest
- where to put current CBC IV in network byte ordered arraypublic void setCBCIV(long lNewCBCIV)
lNewCBCIV
- the new CBC IVpublic void setCBCIV(byte[] newCBCIV)
newCBCIV
- the new CBC IV in network byte ordered arraypublic void cleanUp()
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 encryptpublic void encrypt(int[] inbuffer, int[] outbuffer)
inbuffer
- buffer with plaintext dataoutBuffer
- buffer to get the ciphertext datapublic void encrypt(int[] buffer)
buffer
- buffer to encryptpublic void encrypt(long[] inbuffer, long[] outbuffer)
inbuffer
- buffer with plaintext dataoutbuffer
- buffer to get the ciphertext datapublic void encrypt(long[] buffer)
buffer
- buffer to encryptpublic void decrypt(byte[] inbuffer, byte[] outbuffer)
inbuffer
- buffer with ciphertext dataoutBuffer
- buffer to get the plaintext datapublic void decrypt(byte[] buffer)
buffer
- buffer to decryptpublic void decrypt(int[] inbuffer, int[] outbuffer)
inbuffer
- buffer with ciphertext dataoutbuffer
- buffer to get the plaintext datapublic void decrypt(int[] buffer)
buffer
- buffer to decryptpublic void decrypt(long[] inbuffer, long[] outbuffer)
inbuffer
- buffer with ciphertext dataoutbuffer
- buffer to get the plaintext datapublic void decrypt(long[] buffer)
buffer
- buffer to decrypt
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |