public class BlowfishCBC extends BlowfishECB
BLOCKSIZE, MAXKEYLENGTH| Constructor and Description |
|---|
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
|
| Modifier and Type | Method and Description |
|---|---|
void |
cleanUp()
see net.sourceforge.blowfishj.BlowfishECB#cleanUp()
|
void |
decrypt(byte[] buf)
Deprecated.
use encrypt(byte[], int, byte[], int, int) instead
|
void |
decrypt(byte[] inBuf,
byte[] outBuf)
Deprecated.
use decrypt(byte[], int, byte[], int, int) instead
|
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)
Deprecated.
use decrypt(int[], int, int[], int, int) instead
|
void |
decrypt(int[] inBuf,
int[] outBuf)
Deprecated.
use decrypt(int[], int, int[], int, int) instead
|
void |
decrypt(int[] inBuf,
int nInPos,
int[] outBuf,
int nOutPos,
int nLen)
Decrypts an integer buffer to another integer buffer.
|
void |
decrypt(long[] buf)
Deprecated.
use decrypt(long[], int, long[], int, int) instead
|
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)
Deprecated.
use decrypt(long[], int, long[], int, int) instead
|
void |
encrypt(byte[] buf)
Deprecated.
use encrypt(byte[], int, int) instead
|
void |
encrypt(byte[] inBuf,
byte[] outBuf)
Deprecated.
use encrypt(byte[], int, byte[], int, int) instead
|
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)
Deprecated.
use encrypt(int[], int, int[], int, int) instead
|
void |
encrypt(int[] inBuf,
int[] outBuf)
Deprecated.
use encrypt(int[], int, int[], int, int) instead
|
void |
encrypt(int[] inBuf,
int nInPos,
int[] outBuf,
int nOutPos,
int nLen)
Encrypts an integer buffer to another integer buffer.
|
void |
encrypt(long[] buf)
Deprecated.
use encrypt(long[], int, long[], int, int) instead
|
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)
Deprecated.
use encrypt(long[], int, long[], int, int) instead
|
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).
|
encryptPrv, initialize, selfTest, weakKeyCheckpublic 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 IVpublic 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 BlowfishECBpublic int encrypt(byte[] inBuf,
int nInPos,
byte[] outBuf,
int nOutPos,
int nLen)
BlowfishECBencrypt 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 encryptBlowfishECB.encrypt(byte[], int, byte[], int, int)public void encrypt(byte[] inBuf,
byte[] outBuf)
BlowfishECBencrypt in class BlowfishECBinBuf - buffer with plaintext dataoutBuf - buffer to get the ciphertext dataBlowfishECB.encrypt(byte[], byte[])public void encrypt(byte[] buf)
BlowfishECBencrypt in class BlowfishECBbuf - buffer to encryptBlowfishECB.encrypt(byte[])public void encrypt(int[] inBuf,
int nInPos,
int[] outBuf,
int nOutPos,
int nLen)
BlowfishECBencrypt in class BlowfishECBinBuf - 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)
BlowfishECBencrypt in class BlowfishECBinBuf - buffer with ciphertext dataoutBuf - buffer to get the plaintext dataBlowfishECB.encrypt(int[], int[])public void encrypt(int[] buf)
BlowfishECBencrypt in class BlowfishECBbuf - buffer to decryptBlowfishECB.encrypt(int[])public void encrypt(long[] inBuf,
int nInPos,
long[] outBuf,
int nOutPos,
int nLen)
BlowfishECBencrypt in class BlowfishECBinBuf - 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)
BlowfishECBencrypt in class BlowfishECBinBuf - buffer with ciphertext dataoutBuf - buffer to get the plaintext dataBlowfishECB.encrypt(long[], long[])public void encrypt(long[] buf)
BlowfishECBencrypt in class BlowfishECBbuf - buffer to decryptBlowfishECB.encrypt(long[])public int decrypt(byte[] inBuf,
int nInPos,
byte[] outBuf,
int nOutPos,
int nLen)
BlowfishECBdecrypt 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 decryptBlowfishECB.decrypt(byte[], int, byte[], int, int)public void decrypt(byte[] inBuf,
byte[] outBuf)
BlowfishECBdecrypt in class BlowfishECBinBuf - buffer with ciphertext dataoutBuf - buffer to get the plaintext dataBlowfishECB.decrypt(byte[], byte[])public void decrypt(byte[] buf)
BlowfishECBdecrypt in class BlowfishECBbuf - buffer to decryptBlowfishECB.decrypt(byte[])public void decrypt(int[] inBuf,
int nInPos,
int[] outBuf,
int nOutPos,
int nLen)
BlowfishECBdecrypt in class BlowfishECBinBuf - 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)
BlowfishECBdecrypt in class BlowfishECBinBuf - buffer with ciphertext dataoutBuf - buffer to get the plaintext dataBlowfishECB.decrypt(int[], int[])public void decrypt(int[] buf)
BlowfishECBdecrypt in class BlowfishECBbuf - buffer to decryptBlowfishECB.decrypt(int[])public void decrypt(long[] inBuf,
int nInPos,
long[] outBuf,
int nOutPos,
int nLen)
BlowfishECBdecrypt in class BlowfishECBinBuf - 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)
BlowfishECBdecrypt in class BlowfishECBinBuf - buffer with ciphertext dataoutBuf - buffer to get the plaintext dataBlowfishECB.decrypt(long[], long[])public void decrypt(long[] buf)
BlowfishECBdecrypt in class BlowfishECBbuf - buffer to decryptBlowfishECB.decrypt(long[])