| Modifier and Type | Field and Description |
|---|---|
| private boolean | |
| protected int[] | |
| protected int[] | |
| private int | |
| private byte[] | |
| protected static final int | |
| protected static final int | |
| protected static final int | |
| protected static final int | |
| protected static final int[] | |
| protected static final int[] | |
| protected static final int[] | |
| protected static final int[] | |
| protected static final int[] | |
| protected static final int[] | |
| protected static final int[] | |
| protected static final int[] |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| protected final void | |
| protected final void | |
| protected final int | |
| protected final void | |
| protected final void | CAST_Encipher(int
the LH-32bits of the plaintext block L0, int the RH-32bits of the plaintext block R0, int[] result)Does the 16 rounds to encrypt the block. |
| protected int | decryptBlock(byte[]
The plaintext buffer src, int An offset into src srcIndex, byte[] The ciphertext buffer dst, int An offset into dst dstIndex)Decrypt the given input starting at the given offset and place the result in the provided buffer starting at the given offset. |
| protected int | encryptBlock(byte[]
The plaintext buffer src, int An offset into src srcIndex, byte[] The ciphertext buffer dst, int An offset into dst dstIndex)Encrypt the given input starting at the given offset and place the result in the provided buffer starting at the given offset. |
| protected final int | F1(int
the input to be processed D, int the mask to be used from Km[n] Kmi, int the rotation value to be used Kri)The first of the three processing functions for the encryption and decryption. |
| protected final int | F2(int
the input to be processed D, int the mask to be used from Km[n] Kmi, int the rotation value to be used Kri)The second of the three processing functions for the encryption and decryption. |
| protected final int | F3(int
the input to be processed D, int the mask to be used from Km[n] Kmi, int the rotation value to be used Kri)The third of the three processing functions for the encryption and decryption. |
| public String | getAlgorithmName()
Implements org. |
| public int | getBlockSize()
Implements org. |
| public void | init(boolean
whether or not we are for encryption. encrypting, CipherParameters the parameters required to set up the cipher. params)Implements org. |
| protected final int | |
| 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 void | |
| protected void |
| _encrypting | back to summary |
|---|---|
| private boolean _encrypting | |
| _Km | back to summary |
|---|---|
| protected int[] _Km | |
| _Kr | back to summary |
|---|---|
| protected int[] _Kr | |
| _rounds | back to summary |
|---|---|
| private int _rounds | |
| _workingKey | back to summary |
|---|---|
| private byte[] _workingKey | |
| BLOCK_SIZE | back to summary |
|---|---|
| protected static final int BLOCK_SIZE | |
| M32 | back to summary |
|---|---|
| protected static final int M32 | |
| MAX_ROUNDS | back to summary |
|---|---|
| protected static final int MAX_ROUNDS | |
| RED_ROUNDS | back to summary |
|---|---|
| protected static final int RED_ROUNDS | |
| S1 | back to summary |
|---|---|
| protected static final int[] S1 | |
| S2 | back to summary |
|---|---|
| protected static final int[] S2 | |
| S3 | back to summary |
|---|---|
| protected static final int[] S3 | |
| S4 | back to summary |
|---|---|
| protected static final int[] S4 | |
| S5 | back to summary |
|---|---|
| protected static final int[] S5 | |
| S6 | back to summary |
|---|---|
| protected static final int[] S6 | |
| S7 | back to summary |
|---|---|
| protected static final int[] S7 | |
| S8 | back to summary |
|---|---|
| protected static final int[] S8 | |
| CAST5Engine | back to summary |
|---|---|
| public CAST5Engine() | |
| Bits32ToBytes | back to summary |
|---|---|
| protected final void Bits32ToBytes(int in, byte[] b, int offset) | |
| Bits32ToInts | back to summary |
|---|---|
| protected final void Bits32ToInts(int in, int[] b, int offset) | |
| BytesTo32bits | back to summary |
|---|---|
| protected final int BytesTo32bits(byte[] b, int i) | |
| CAST_Decipher | back to summary |
|---|---|
| protected final void CAST_Decipher(int L16, int R16, int[] result) | |
| CAST_Encipher | back to summary |
|---|---|
| protected final void CAST_Encipher(int L0, int R0, int[] result) Does the 16 rounds to encrypt the block.
| |
| decryptBlock | back to summary |
|---|---|
| protected int decryptBlock(byte[] src, int srcIndex, byte[] dst, int dstIndex) Decrypt the given input starting at the given offset and place the result in the provided buffer starting at the given offset.
| |
| encryptBlock | back to summary |
|---|---|
| protected int encryptBlock(byte[] src, int srcIndex, byte[] dst, int dstIndex) Encrypt the given input starting at the given offset and place the result in the provided buffer starting at the given offset.
| |
| F1 | back to summary |
|---|---|
| protected final int F1(int D, int Kmi, int Kri) The first of the three processing functions for the encryption and decryption.
| |
| F2 | back to summary |
|---|---|
| protected final int F2(int D, int Kmi, int Kri) The second of the three processing functions for the encryption and decryption.
| |
| F3 | back to summary |
|---|---|
| protected final int F3(int D, int Kmi, int Kri) The third of the three processing functions for the encryption and decryption.
| |
| 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).
| |
| init | back to summary |
|---|---|
| public void init(boolean encrypting, CipherParameters params) Implements org. initialise a CAST cipher.
| |
| IntsTo32bits | back to summary |
|---|---|
| protected final int IntsTo32bits(int[] b, int i) | |
| processBlock | back to summary |
|---|---|
| public int processBlock(byte[] in, int inOff, byte[] out, int outOff) Implements org. Doc from 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. 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). | |
| setKey | back to summary |
|---|---|
| protected void setKey(byte[] key) | |