|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectewe.security.BlowfishECB
ewe.security.BlowfishCBC
Implementation of the Blowfish encryption algorithm in CBC mode.
| Field Summary |
| Fields inherited from class ewe.security.BlowfishECB |
BLOCKSIZE, MAXKEYLENGTH |
| Constructor Summary | |
BlowfishCBC(byte[] key)
Default constructor, uses a zero CBC IV. |
|
BlowfishCBC(byte[] key,
byte[] initCBCIV)
Deprecated. use BlowfishCBC(byte[], int, int, byte[], int) instead |
|
BlowfishCBC(byte[] key,
int nOfs,
int nLen)
Constructor, uses a zero CBC IV. |
|
BlowfishCBC(byte[] key,
int nOfs,
int nLen,
byte[] initCBCIV,
int nIVOfs)
Constructor to define the CBC IV. |
|
BlowfishCBC(byte[] key,
int nOfs,
int nLen,
long lInitCBCIV)
Constructor to define the CBC IV. |
|
BlowfishCBC(byte[] key,
long lInitCBCIV)
Deprecated. use BlowfishCBC(byte[], int, int, long) instead |
|
| Method Summary | |
void |
cleanUp()
see BlowfishJ.BlowfishECB#cleanUp() |
int |
decrypt(byte[] inBuf,
int nInPos,
byte[] outBuf,
int nOutPos,
int nLen)
Decrypts a byte buffer to another buffer, extra misaligned data will not be processed. |
int |
encrypt(byte[] inBuf,
int nInPos,
byte[] outBuf,
int nOutPos,
int nLen)
Encrypts a byte buffer to another buffer, extra misaligned data will not be processed. |
long |
getCBCIV()
Gets the current CBC IV. |
void |
getCBCIV(byte[] dest)
Deprecated. use getCBCIV(byte[], int) instead |
void |
getCBCIV(byte[] dest,
int nOfs)
Gets a copy of the current CBC IV. |
void |
reset(byte[] key,
int offset,
int length)
Reset the Encryptor/Decryptor using a specific key. |
void |
setCBCIV(byte[] newCBCIV)
Deprecated. use setCBCIV(byte[], int) instead |
void |
setCBCIV(byte[] newCBCIV,
int nOfs)
Sets the current CBC IV (for cipher resets). |
void |
setCBCIV(long lNewCBCIV)
Sets the current CBC IV (for cipher resets). |
| Methods inherited from class ewe.security.BlowfishECB |
byteArrayToInt, encryptPrv, initialize, reset, weakKeyCheck |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, toString |
| Constructor Detail |
public BlowfishCBC(byte[] key)
key - key material, up to MAXKEYLENGTH bytes
public BlowfishCBC(byte[] key,
int nOfs,
int nLen)
key - key material, up to MAXKEYLENGTH bytesnOfs - where to start reading the keynLen - size of the key in bytes
public BlowfishCBC(byte[] key,
long lInitCBCIV)
key - key material, up to MAXKEYLENGTH byteslInitCBCIV - the CBC IV
public BlowfishCBC(byte[] key,
int nOfs,
int nLen,
long lInitCBCIV)
key - key material, up to MAXKEYLENGTH bytesnOfs - where to start reading the keynLen - size of the key in byteslInitCBCIV - the CBC IV
public BlowfishCBC(byte[] key,
byte[] initCBCIV)
key - key material, up to MAXKEYLENGTH bytesinitCBCIV - the CBC IV (array with BLOCKSIZE bytes)
public BlowfishCBC(byte[] key,
int nOfs,
int nLen,
byte[] initCBCIV,
int nIVOfs)
key - key material, up to MAXKEYLENGTH bytesnOfs - where to start reading the keynLen - size of the key in bytesinitCBCIV - the CBC IVnIVOfs - where to start reading the IV| Method Detail |
public long getCBCIV()
public void getCBCIV(byte[] dest)
dest - where to put current CBC IV
public void getCBCIV(byte[] dest,
int nOfs)
dest - buffernOfs - where to start writingpublic void setCBCIV(long lNewCBCIV)
lNewCBCIV - the new CBC IVpublic void setCBCIV(byte[] newCBCIV)
newCBCIV - the new CBC IV
public void setCBCIV(byte[] newCBCIV,
int nOfs)
newCBCIV - the new CBC IVnOfs - where to start reading the IV
public void reset(byte[] key,
int offset,
int length)
BlowfishECB
reset in class BlowfishECBpublic void cleanUp()
cleanUp in class BlowfishECB
public int encrypt(byte[] inBuf,
int nInPos,
byte[] outBuf,
int nOutPos,
int nLen)
BlowfishECB
encrypt in class BlowfishECBinBuf - buffer with plaintext datanInPos - where to start reading the plaintext dataoutBuf - buffer to put the ciphertext datanOutPos - where to start writing the ciphertext datanLen - number of bytes to encrypt
BlowfishJ.BlowfishECB#encrypt(byte[], int, byte[], int, int)
public int decrypt(byte[] inBuf,
int nInPos,
byte[] outBuf,
int nOutPos,
int nLen)
BlowfishECB
decrypt in class BlowfishECBinBuf - buffer with ciphertext datanInPos - where to start reading the ciphertext dataoutBuf - buffer to put the plaintext datanOutPos - where to start writing the plaintext datanLen - number of bytes to decrypt
BlowfishJ.BlowfishECB#decrypt(byte[], int, byte[], int, int)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||