| Modifier and Type | Field and Description |
|---|---|
| private int | |
| private int | |
| private byte[] | |
| private byte[] | |
| private BlockCipher | |
| private boolean | |
| private byte[] | |
| private byte[] |
| Access | Constructor and Description |
|---|---|
| public | CFBBlockCipher(BlockCipher
the block cipher to be used as the basis of the
feedback mode. cipher, int the block size in bits (note: a multiple of 8) bitBlockSize)
Deprecated
use the equivalent CFBBlockCipher.newInstance() static method.
Basic constructor. |
| Modifier and Type | Method and Description |
|---|---|
| protected byte | |
| public 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 encrypted data will be copied into. out, int the offset into the out array the output will start at. outOff)Do the appropriate processing for CFB mode decryption. |
| private byte | |
| public 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 processing for CFB mode encryption. |
| private byte | |
| public String | Returns: the name of the underlying algorithm followed by "/CFB" and the block size in bits.Implements org. return the algorithm name and mode. |
| public int | Returns: the block size we are operating at (in bytes).Implements org. return the block size we are operating at. |
| public byte[] | |
| 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. Initialise the cipher and, possibly, the initialisation vector (IV). |
| public static CFBModeCipher | newInstance(BlockCipher
the base cipher for the CFB mode. cipher, int the block size (in bits) used for the CFB mode. blockSize)Return a new CFB 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. Process one block of input from the array in and write it to the out array. |
| public void | reset()
Implements org. reset the chaining vector back to the IV and reset the underlying cipher. |
| blockSize | back to summary |
|---|---|
| private int blockSize | |
| byteCount | back to summary |
|---|---|
| private int byteCount | |
| cfbOutV | back to summary |
|---|---|
| private byte[] cfbOutV | |
| cfbV | back to summary |
|---|---|
| private byte[] cfbV | |
| cipher | back to summary |
|---|---|
| private BlockCipher cipher | |
| encrypting | back to summary |
|---|---|
| private boolean encrypting | |
| inBuf | back to summary |
|---|---|
| private byte[] inBuf | |
| IV | back to summary |
|---|---|
| private byte[] IV | |
| CFBBlockCipher | back to summary |
|---|---|
| public CFBBlockCipher(BlockCipher cipher, int bitBlockSize)
Deprecated use the equivalent CFBBlockCipher.newInstance() static method. Basic constructor.
| |
| calculateByte | back to summary |
|---|---|
| protected byte calculateByte(byte in) throws DataLengthException, IllegalStateException Implements abstract org. | |
| decryptBlock | back to summary |
|---|---|
| public int decryptBlock(byte[] in, int inOff, byte[] out, int outOff) throws DataLengthException, IllegalStateException Do the appropriate processing for CFB mode decryption.
| |
| decryptByte | back to summary |
|---|---|
| private byte decryptByte(byte in) | |
| encryptBlock | back to summary |
|---|---|
| public int encryptBlock(byte[] in, int inOff, byte[] out, int outOff) throws DataLengthException, IllegalStateException Do the appropriate processing for CFB mode encryption.
| |
| encryptByte | back to summary |
|---|---|
| private byte encryptByte(byte in) | |
| 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 we are operating at.
| |
| getCurrentIV | back to summary |
|---|---|
| public byte[] getCurrentIV() Return the current state of the initialisation vector.
| |
| 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. An IV which is too short is handled in FIPS compliant fashion.
| |
| newInstance | back to summary |
|---|---|
| public static CFBModeCipher newInstance(BlockCipher cipher, int blockSize) Return a new CFB 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. | |