| Modifier and Type | Field and Description |
|---|---|
| private final int | |
| private byte[] | |
| private int | |
| private final BlockCipher | |
| private byte[] | |
| private boolean | |
| private byte[] | |
| private final int |
| Access | Constructor and Description |
|---|---|
| public | G3413CTRBlockCipher(BlockCipher
the block cipher to be used as the basis of the
counter mode (must have a 64 bit block size). cipher)Basic constructor. |
| public | G3413CTRBlockCipher(BlockCipher
the block cipher to be used as the basis of the
counter mode (must have a 64 bit block size). cipher, int basic unit (defined as s) bitBlockSize)Basic constructor. |
| Modifier and Type | Method and Description |
|---|---|
| protected byte | |
| private byte[] | |
| private void | |
| public String | Returns: the name of the underlying algorithm followed by "/GCTR" and the block size in bitsImplements 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 (in bytes). |
| 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). |
| 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. Process one block of input from the array in and write it to the out array. |
| public void | reset()
Implements org. reset the feedback vector back to the IV and reset the underlying cipher. |
| blockSize | back to summary |
|---|---|
| private final int blockSize | |
| buf | back to summary |
|---|---|
| private byte[] buf | |
| byteCount | back to summary |
|---|---|
| private int byteCount | |
| cipher | back to summary |
|---|---|
| private final BlockCipher cipher | |
| CTR | back to summary |
|---|---|
| private byte[] CTR | |
| initialized | back to summary |
|---|---|
| private boolean initialized | |
| IV | back to summary |
|---|---|
| private byte[] IV | |
| s | back to summary |
|---|---|
| private final int s | |
| G3413CTRBlockCipher | back to summary |
|---|---|
| public G3413CTRBlockCipher(BlockCipher cipher) Basic constructor.
| |
| G3413CTRBlockCipher | back to summary |
|---|---|
| public G3413CTRBlockCipher(BlockCipher cipher, int bitBlockSize) Basic constructor.
| |
| calculateByte | back to summary |
|---|---|
| protected byte calculateByte(byte in) Implements abstract org. | |
| generateBuf | back to summary |
|---|---|
| private byte[] generateBuf() | |
| generateCRT | back to summary |
|---|---|
| private void generateCRT() | |
| 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.
| |
| initArrays | back to summary |
|---|---|
| private void initArrays() | |
| 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. | |