|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sourceforge.blowfishj.BlowfishECB
net.sourceforge.blowfishj.BlowfishCBC
Implementation of the Blowfish encryption algorithm in CBC mode.
Field Summary |
Fields inherited from class net.sourceforge.blowfishj.BlowfishECB |
BLOCKSIZE, MAXKEYLENGTH |
Constructor Summary | |
BlowfishCBC(byte[] key)
Deprecated. use BlowfishCBC(byte[], int, int) instead |
|
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 net.sourceforge.blowfishj.BlowfishECB#cleanUp() |
void |
decrypt(byte[] buf)
Decrypts a byte buffer (should be aligned) to itself. |
void |
decrypt(byte[] inBuf,
byte[] outBuf)
Decrypts a byte buffer (should be aligned to a block border) to another byte buffer (of the same size or bigger). |
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. |
void |
decrypt(int[] buf)
Decrypts an integer buffer to itself. |
void |
decrypt(int[] inBuf,
int[] outBuf)
Decrypts an integer buffer (should be aligned to a two integer border) to another int buffer (of the same size or bigger). |
void |
decrypt(int[] inBuf,
int nInPos,
int[] outBuf,
int nOutPos,
int nLen)
Decrypts an integer buffer to another integer buffer. |
void |
decrypt(long[] buf)
Decrypts a long buffer to itself. |
void |
decrypt(long[] inBuf,
int nInPos,
long[] outBuf,
int nOutPos,
int nLen)
Decrypts an long buffer to another long buffer. |
void |
decrypt(long[] inBuf,
long[] outBuf)
Decrypts a long buffer to another long buffer (of the same size or bigger). |
void |
encrypt(byte[] buf)
Encrypts a byte buffer (should be aligned to a block border) to itself. |
void |
encrypt(byte[] inBuf,
byte[] outBuf)
Encrypts a byte buffer (should be aligned to a block border) to another buffer (of the same size or bigger). |
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. |
void |
encrypt(int[] buf)
Encrypts an integer buffer to itself. |
void |
encrypt(int[] inBuf,
int[] outBuf)
Encrypts an integer buffer (should be aligned to a two integer border) to another int buffer (of the same size or bigger). |
void |
encrypt(int[] inBuf,
int nInPos,
int[] outBuf,
int nOutPos,
int nLen)
Encrypts an integer buffer to another integer buffer. |
void |
encrypt(long[] buf)
Encrypts a long buffer to itself. |
void |
encrypt(long[] inBuf,
int nInPos,
long[] outBuf,
int nOutPos,
int nLen)
Encrypts an long buffer to another long buffer. |
void |
encrypt(long[] inBuf,
long[] outBuf)
Encrypts a long buffer to another long buffer (of the same size or bigger). |
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 |
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 net.sourceforge.blowfishj.BlowfishECB |
encryptPrv, initialize, selfTest, weakKeyCheck |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public BlowfishCBC(byte[] key)
key
- key material, up to MAXKEYLENGTH bytespublic 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 bytespublic BlowfishCBC(byte[] key, long lInitCBCIV)
key
- key material, up to MAXKEYLENGTH byteslInitCBCIV
- the CBC IVpublic 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 IVpublic 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 IVMethod Detail |
public long getCBCIV()
public void getCBCIV(byte[] dest)
dest
- where to put current CBC IVpublic 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 IVpublic void setCBCIV(byte[] newCBCIV, int nOfs)
newCBCIV
- the new CBC IVnOfs
- where to start reading the IVpublic void cleanUp()
cleanUp
in class BlowfishECB
public int encrypt(byte[] inBuf, int nInPos, byte[] outBuf, int nOutPos, int nLen)
BlowfishECB
encrypt
in class BlowfishECB
inBuf
- 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
BlowfishECB.encrypt(byte[], int, byte[], int, int)
public void encrypt(byte[] inBuf, byte[] outBuf)
BlowfishECB
encrypt
in class BlowfishECB
inBuf
- buffer with plaintext dataoutBuf
- buffer to get the ciphertext dataBlowfishECB.encrypt(byte[], byte[])
public void encrypt(byte[] buf)
BlowfishECB
encrypt
in class BlowfishECB
buf
- buffer to encryptBlowfishECB.encrypt(byte[])
public void encrypt(int[] inBuf, int nInPos, int[] outBuf, int nOutPos, int nLen)
BlowfishECB
encrypt
in class BlowfishECB
inBuf
- buffer with plaintext datanInPos
- where to start reading the plaintext dataoutBuf
- buffer to write the ciphertext datanOutPos
- where to start writing the ciphertext datanLen
- number of integers to encryptBlowfishECB.encrypt(int[], int, int[], int, int)
public void encrypt(int[] inBuf, int[] outBuf)
BlowfishECB
encrypt
in class BlowfishECB
inBuf
- buffer with ciphertext dataoutBuf
- buffer to get the plaintext dataBlowfishECB.encrypt(int[], int[])
public void encrypt(int[] buf)
BlowfishECB
encrypt
in class BlowfishECB
buf
- buffer to decryptBlowfishECB.encrypt(int[])
public void encrypt(long[] inBuf, int nInPos, long[] outBuf, int nOutPos, int nLen)
BlowfishECB
encrypt
in class BlowfishECB
inBuf
- buffer with plaintext datanInPos
- where to start reading the plaintext dataoutBuf
- buffer to write the ciphertext datanOutPos
- where to start writing the ciphertext datanLen
- number of longs to decryptBlowfishECB.encrypt(long[], int, long[], int, int)
public void encrypt(long[] inBuf, long[] outBuf)
BlowfishECB
encrypt
in class BlowfishECB
inBuf
- buffer with ciphertext dataoutBuf
- buffer to get the plaintext dataBlowfishECB.encrypt(long[], long[])
public void encrypt(long[] buf)
BlowfishECB
encrypt
in class BlowfishECB
buf
- buffer to decryptBlowfishECB.encrypt(long[])
public int decrypt(byte[] inBuf, int nInPos, byte[] outBuf, int nOutPos, int nLen)
BlowfishECB
decrypt
in class BlowfishECB
inBuf
- 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
BlowfishECB.decrypt(byte[], int, byte[], int, int)
public void decrypt(byte[] inBuf, byte[] outBuf)
BlowfishECB
decrypt
in class BlowfishECB
inBuf
- buffer with ciphertext dataoutBuf
- buffer to get the plaintext dataBlowfishECB.decrypt(byte[], byte[])
public void decrypt(byte[] buf)
BlowfishECB
decrypt
in class BlowfishECB
buf
- buffer to decryptBlowfishECB.decrypt(byte[])
public void decrypt(int[] inBuf, int nInPos, int[] outBuf, int nOutPos, int nLen)
BlowfishECB
decrypt
in class BlowfishECB
inBuf
- buffer with ciphertext datanInPos
- where to start reading the ciphertext dataoutBuf
- buffer to get the plaintext datanOutPos
- where to start writing the plaintext datanLen
- number of integers to decryptBlowfishECB.decrypt(int[], int, int[], int, int)
public void decrypt(int[] inBuf, int[] outBuf)
BlowfishECB
decrypt
in class BlowfishECB
inBuf
- buffer with ciphertext dataoutBuf
- buffer to get the plaintext dataBlowfishECB.decrypt(int[], int[])
public void decrypt(int[] buf)
BlowfishECB
decrypt
in class BlowfishECB
buf
- buffer to decryptBlowfishECB.decrypt(int[])
public void decrypt(long[] inBuf, int nInPos, long[] outBuf, int nOutPos, int nLen)
BlowfishECB
decrypt
in class BlowfishECB
inBuf
- buffer with ciphertext datanInPos
- where to start reading the ciphertext dataoutBuf
- buffer to write the plaintext datanOutPos
- where to start writing the plaintext datanLen
- number of longs to decryptBlowfishECB.decrypt(long[], int, long[], int, int)
public void decrypt(long[] inBuf, long[] outBuf)
BlowfishECB
decrypt
in class BlowfishECB
inBuf
- buffer with ciphertext dataoutBuf
- buffer to get the plaintext dataBlowfishECB.decrypt(long[], long[])
public void decrypt(long[] buf)
BlowfishECB
decrypt
in class BlowfishECB
buf
- buffer to decryptBlowfishECB.decrypt(long[])
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |