Class BaseCBCCipher

java.lang.Object
org.apache.sshd.common.cipher.BaseCipher
org.apache.sshd.common.cipher.BaseCBCCipher
All Implemented Interfaces:
AlgorithmNameProvider, Cipher, CipherInformation, KeySizeIndicator

public class BaseCBCCipher extends BaseCipher
  • Field Details

    • lastEncryptedBlock

      private byte[] lastEncryptedBlock
  • Constructor Details

    • BaseCBCCipher

      public BaseCBCCipher(int ivsize, int authSize, int kdfSize, String algorithm, int keySize, String transformation, int blkSize)
  • Method Details

    • update

      public void update(byte[] input, int inputOffset, int inputLen) throws Exception
      Description copied from interface: Cipher
      Performs in-place encryption or decryption on the given data.
      Specified by:
      update in interface Cipher
      Overrides:
      update in class BaseCipher
      Parameters:
      input - The input/output bytes
      inputOffset - The offset of the data in the data buffer
      inputLen - The number of bytes to update, starting at the given offset; must be a multiple of the cipher's block size
      Throws:
      Exception - If failed to execute
    • determineNewParameters

      protected AlgorithmParameterSpec determineNewParameters(byte[] processed, int offset, int length)
      Overrides:
      determineNewParameters in class BaseCipher