| Modifier and Type | Field and Description |
|---|---|
| private int | |
| private byte[] | |
| private byte[] | |
| private BlockCipher | |
| private boolean | |
| private byte[] |
| Access | Constructor and Description |
|---|---|
| public | CBCBlockCipher(BlockCipher
the block cipher to be used as the basis of chaining. cipher)
Deprecated
use the CBCBlockCipher.newInstance() static method.
Basic constructor.
|
| Modifier and Type | Method and Description |
|---|---|
| private int | Returns: the number of bytes processed and produced.the array containing the data to be decrypted. in, int offset into the in array the data starts at. inOff, byte[] the array the decrypted data will be copied into. out, int the offset into the out array the output will start at. outOff)Do the appropriate chaining step for CBC mode decryption. |
| private int | Returns: the number of bytes processed and produced.the array containing the data to be encrypted. in, int offset into the in array the data starts at. inOff, byte[] the array the encrypted data will be copied into. out, int the offset into the out array the output will start at. outOff)Do the appropriate chaining step for CBC mode encryption. |
| public String | Returns: the name of the underlying algorithm followed by "/CBC".Implements org. |
| public int | Returns: the block size of the underlying cipher.Implements org. |
| public BlockCipher | Returns: the underlying block cipher that we are wrapping.Implements org. |
| public void | init(boolean
if true the cipher is initialised for
encryption, if false for decryption. encrypting, CipherParameters the key and other data required by the cipher. params)Implements org. |
| public static CBCModeCipher | newInstance(BlockCipher
the base cipher for the CBC mode. cipher)Return a new CBC mode cipher based on the passed in base cipher |
| public int | Returns: the number of bytes processed and produced.the array containing the input data. in, int offset into the in array the data starts at. inOff, byte[] the array the output data will be copied into. out, int the offset into the out array the output will start at. outOff)Implements org. |
| public void | reset()
Implements org. |
| blockSize | back to summary |
|---|---|
| private int blockSize | |
| cbcNextV | back to summary |
|---|---|
| private byte[] cbcNextV | |
| cbcV | back to summary |
|---|---|
| private byte[] cbcV | |
| cipher | back to summary |
|---|---|
| private BlockCipher cipher | |
| encrypting | back to summary |
|---|---|
| private boolean encrypting | |
| IV | back to summary |
|---|---|
| private byte[] IV | |
| CBCBlockCipher | back to summary |
|---|---|
| public CBCBlockCipher(BlockCipher cipher)
Deprecated use the CBCBlockCipher.newInstance() static method. Basic constructor.
| |
| decryptBlock | back to summary |
|---|---|
| private int decryptBlock(byte[] in, int inOff, byte[] out, int outOff) throws DataLengthException, IllegalStateException Do the appropriate chaining step for CBC mode decryption.
| |
| encryptBlock | back to summary |
|---|---|
| private int encryptBlock(byte[] in, int inOff, byte[] out, int outOff) throws DataLengthException, IllegalStateException Do the appropriate chaining step for CBC mode encryption.
| |
| getAlgorithmName | back to summary |
|---|---|
| public String getAlgorithmName() Implements org. return the algorithm name and mode.
| |
| getBlockSize | back to summary |
|---|---|
| public int getBlockSize() Implements org. return the block size of the underlying cipher.
| |
| getUnderlyingCipher | back to summary |
|---|---|
| public BlockCipher getUnderlyingCipher() Implements org. return the underlying block cipher that we are wrapping.
| |
| init | back to summary |
|---|---|
| public void init(boolean encrypting, CipherParameters params) throws IllegalArgumentException Implements org. Initialise the cipher and, possibly, the initialisation vector (IV). If an IV isn't passed as part of the parameter, the IV will be all zeros.
| |
| newInstance | back to summary |
|---|---|
| public static CBCModeCipher newInstance(BlockCipher cipher) Return a new CBC mode cipher based on the passed in base cipher
| |
| processBlock | back to summary |
|---|---|
| public int processBlock(byte[] in, int inOff, byte[] out, int outOff) throws DataLengthException, IllegalStateException Implements org. Process one block of input from the array in and write it to the out array.
| |
| reset | back to summary |
|---|---|
| public void reset() Implements org. reset the chaining vector back to the IV and reset the underlying cipher. | |