For further info see RFC 2440.
| Modifier and Type | Field and Description |
|---|---|
| private int | |
| private BlockCipher | |
| private int | |
| private boolean | |
| private byte[] | |
| private byte[] | |
| private byte[] |
| Access | Constructor and Description |
|---|---|
| public | OpenPGPCFBBlockCipher(BlockCipher
the block cipher to be used as the basis of the
feedback mode. cipher)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 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 IV 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 processing for CFB IV mode encryption. |
| private byte | Returns: the encrypted bytethe byte to encrypt data, int offset in the current block blockOff)Encrypt one byte of data according to CFB mode. |
| public String | Returns: the name of the underlying algorithm followed by "/OpenPGPCFB" and the block size in bits.Implements org. |
| public int | Returns: the block size we are operating at (in bytes).Implements org. |
| public BlockCipher | Returns: the underlying block cipher that we are wrapping.return the underlying block cipher that we are wrapping. |
| public void | init(boolean
if true the cipher is initialised for
encryption, if false for decryption. forEncryption, CipherParameters the key and other data required by the cipher. params)Implements org. |
| 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 | |
| cipher | back to summary |
|---|---|
| private BlockCipher cipher | |
| count | back to summary |
|---|---|
| private int count | |
| forEncryption | back to summary |
|---|---|
| private boolean forEncryption | |
| FR | back to summary |
|---|---|
| private byte[] FR | |
| FRE | back to summary |
|---|---|
| private byte[] FRE | |
| IV | back to summary |
|---|---|
| private byte[] IV | |
| OpenPGPCFBBlockCipher | back to summary |
|---|---|
| public OpenPGPCFBBlockCipher(BlockCipher cipher) Basic constructor.
| |
| decryptBlock | back to summary |
|---|---|
| private int decryptBlock(byte[] in, int inOff, byte[] out, int outOff) throws DataLengthException, IllegalStateException Do the appropriate processing for CFB IV mode decryption.
| |
| encryptBlock | back to summary |
|---|---|
| private int encryptBlock(byte[] in, int inOff, byte[] out, int outOff) throws DataLengthException, IllegalStateException Do the appropriate processing for CFB IV mode encryption.
| |
| encryptByte | back to summary |
|---|---|
| private byte encryptByte(byte data, int blockOff) Encrypt one byte of data according to CFB mode.
| |
| 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.
| |
| getUnderlyingCipher | back to summary |
|---|---|
| public BlockCipher getUnderlyingCipher() return the underlying block cipher that we are wrapping.
| |
| init | back to summary |
|---|---|
| public void init(boolean forEncryption, 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.
| |
| 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. | |