| Modifier and Type | Field and Description |
|---|---|
| private final int | |
| private int | |
| private final BlockCipher | |
| private byte[] | |
| private byte[] | |
| private byte[] |
| Access | Constructor and Description |
|---|---|
| public | SICBlockCipher(BlockCipher
the block cipher to be used. c)
Deprecated
use newInstance() method.
Basic constructor.
|
| Modifier and Type | Method and Description |
|---|---|
| private void | |
| protected byte | |
| private void | |
| private void | |
| private void | |
| public String | getAlgorithmName()
Implements org. |
| public int | getBlockSize()
Implements org. |
| public long | getPosition()
Implements org. |
| private void | |
| private void | |
| private void | |
| 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 static CTRModeCipher | newInstance(BlockCipher
the base cipher for the SIC/CTR mode. cipher)Return a new SIC/CTR mode cipher based on the passed in base cipher |
| public int | processBlock(byte[]
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 int | processBytes(byte[]
the input byte array. in, int the offset into the in array where the data to be processed starts. inOff, int the number of bytes to be processed. len, byte[] the output buffer the processed bytes go into. out, int the offset into the output byte array the processed data starts at. outOff)Overrides org. Implements org. |
| public void | reset()
Implements org. |
| public long | seekTo(long
the number of bytes in to set the cipher state to. position)Implements org. |
| public long | skip(long
the number of bytes to skip (positive forward, negative backwards). numberOfBytes)Implements org. |
| blockSize | back to summary |
|---|---|
| private final int blockSize | |
| byteCount | back to summary |
|---|---|
| private int byteCount | |
| cipher | back to summary |
|---|---|
| private final BlockCipher cipher | |
| counter | back to summary |
|---|---|
| private byte[] counter | |
| counterOut | back to summary |
|---|---|
| private byte[] counterOut | |
| IV | back to summary |
|---|---|
| private byte[] IV | |
| SICBlockCipher | back to summary |
|---|---|
| public SICBlockCipher(BlockCipher c)
Deprecated use newInstance() method. Basic constructor.
| |
| adjustCounter | back to summary |
|---|---|
| private void adjustCounter(long n) | |
| calculateByte | back to summary |
|---|---|
| protected byte calculateByte(byte in) throws DataLengthException, IllegalStateException Implements abstract org. | |
| checkCounter | back to summary |
|---|---|
| private void checkCounter() | |
| checkLastIncrement | back to summary |
|---|---|
| private void checkLastIncrement() | |
| decrementCounterAt | back to summary |
|---|---|
| private void decrementCounterAt(int pos) | |
| getAlgorithmName | back to summary |
|---|---|
| public String getAlgorithmName() Implements org. Doc from org. Return the name of the algorithm the cipher implements.
| |
| getBlockSize | back to summary |
|---|---|
| public int getBlockSize() Implements org. Doc from org. Return the block size for this cipher (in bytes).
| |
| getPosition | back to summary |
|---|---|
| public long getPosition() Implements org. Doc from org. Return the current "position" of the cipher
| |
| incrementCounter | back to summary |
|---|---|
| private void incrementCounter() | |
| incrementCounter | back to summary |
|---|---|
| private void incrementCounter(int offSet) | |
| incrementCounterAt | back to summary |
|---|---|
| private void incrementCounterAt(int pos) | |
| init | back to summary |
|---|---|
| public void init(boolean forEncryption, CipherParameters params) throws IllegalArgumentException Implements org. Doc from org. Initialise the cipher.
| |
| newInstance | back to summary |
|---|---|
| public static CTRModeCipher newInstance(BlockCipher cipher) Return a new SIC/CTR 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. Doc from org. Process one block of input from the array in and write it to the out array.
| |
| processBytes | back to summary |
|---|---|
| public int processBytes(byte[] in, int inOff, int len, byte[] out, int outOff) throws DataLengthException Overrides org. Implements org. Doc from org. process a block of bytes from in putting the result into out.
| |
| reset | back to summary |
|---|---|
| public void reset() Implements org. Doc from org. Reset the cipher. After resetting the cipher is in the same state as it was after the last init (if there was one). | |
| seekTo | back to summary |
|---|---|
| public long seekTo(long position) Implements org. Doc from org. Reset the cipher and then skip forward to a given position.
| |
| skip | back to summary |
|---|---|
| public long skip(long numberOfBytes) Implements org. Doc from org. Skip numberOfBytes forwards, or backwards.
| |