| Modifier and Type | Field and Description |
|---|---|
| private final int | |
| private int | |
| pack-priv static final int | |
| pack-priv static final int | |
| private final BlockCipher | |
| pack-priv boolean | |
| private byte[] | |
| pack-priv int | |
| pack-priv int | |
| private byte[] | |
| private byte[] |
| Access | Constructor and Description |
|---|---|
| public | GOFBBlockCipher(BlockCipher
the block cipher to be used as the basis of the
counter mode (must have a 64 bit block size). cipher)Basic constructor. |
| Modifier and Type | Method and Description |
|---|---|
| private int | |
| protected byte | calculateByte(byte b)
Implements abstract org. |
| public String | Returns: the name of the underlying algorithm followed by "/GCTR" and the block size in bitsImplements org. |
| public int | Returns: the block size we are operating at (in bytes).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. |
| private void | |
| 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 final int blockSize | |
| byteCount | back to summary |
|---|---|
| private int byteCount | |
| C1 | back to summary |
|---|---|
| pack-priv static final int C1 | |
| C2 | back to summary |
|---|---|
| pack-priv static final int C2 | |
| cipher | back to summary |
|---|---|
| private final BlockCipher cipher Hides org. | |
| firstStep | back to summary |
|---|---|
| pack-priv boolean firstStep | |
| IV | back to summary |
|---|---|
| private byte[] IV | |
| N3 | back to summary |
|---|---|
| pack-priv int N3 | |
| N4 | back to summary |
|---|---|
| pack-priv int N4 | |
| ofbOutV | back to summary |
|---|---|
| private byte[] ofbOutV | |
| ofbV | back to summary |
|---|---|
| private byte[] ofbV | |
| GOFBBlockCipher | back to summary |
|---|---|
| public GOFBBlockCipher(BlockCipher cipher) Basic constructor.
| |
| bytesToint | back to summary |
|---|---|
| private int bytesToint(byte[] in, int inOff) | |
| calculateByte | back to summary |
|---|---|
| protected byte calculateByte(byte b) Implements abstract org. | |
| 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 (in bytes).
| |
| 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.
| |
| intTobytes | back to summary |
|---|---|
| private void intTobytes(int num, byte[] out, int outOff) | |
| 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 feedback vector back to the IV and reset the underlying cipher. | |