Class BaseRC4Cipher

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

public class BaseRC4Cipher extends BaseCipher
  • Field Details

  • Constructor Details

    • BaseRC4Cipher

      public BaseRC4Cipher(int ivsize, int kdfSize, int keySize, int blkSize)
  • Method Details

    • initializeIVData

      protected byte[] initializeIVData(Cipher.Mode mode, byte[] iv, int reqLen)
      Overrides:
      initializeIVData in class BaseCipher
    • createCipherInstance

      protected Cipher createCipherInstance(Cipher.Mode mode, byte[] key, byte[] iv) throws Exception
      Overrides:
      createCipherInstance in class BaseCipher
      Throws:
      Exception
    • 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