Interface SshCipher

All Superinterfaces:
Component, SecureComponent, SshComponent
All Known Implementing Classes:
AbstractJCECipher, AbstractSshCipher, AES128Cbc, AES128Ctr, AES128Gcm, AES192Cbc, AES192Ctr, AES256Cbc, AES256Ctr, AES256Gcm, ArcFour, ArcFour128, ArcFour256, BlowfishCbc, ChaCha20Poly1305, NoneCipher, TripleDesCbc, TripleDesCtr

public interface SshCipher extends SshComponent, SecureComponent
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final int
    Decryption mode.
    static final int
    Encryption mode.
  • Method Summary

    Modifier and Type
    Method
    Description
     
    int
    Get the cipher block size.
    int
    Return the key length required
    int
     
    int
     
     
     
    void
    init(int mode, byte[] iv, byte[] keydata)
    Initialize the cipher with up to 40 bytes of iv and key data.
    boolean
     
    void
    transform(byte[] data)
    Transform the byte array according to the cipher mode.
    void
    transform(byte[] src, int start, byte[] dest, int offset, int len)
    Transform the byte array according to the cipher mode; it is legal for the source and destination arrays to reference the same physical array so care should be taken in the transformation process to safeguard this rule.
  • Field Details

  • Method Details

    • getSecurityLevel

      SecurityLevel getSecurityLevel()
      Specified by:
      getSecurityLevel in interface SecureComponent
    • getPriority

      int getPriority()
      Specified by:
      getPriority in interface SecureComponent
    • getAlgorithm

      String getAlgorithm()
      Specified by:
      getAlgorithm in interface SecureComponent
      Specified by:
      getAlgorithm in interface SshComponent
    • getBlockSize

      int getBlockSize()
      Get the cipher block size.
      Returns:
      the block size in bytes.
    • getKeyLength

      int getKeyLength()
      Return the key length required
      Returns:
    • init

      void init(int mode, byte[] iv, byte[] keydata) throws IOException
      Initialize the cipher with up to 40 bytes of iv and key data. Each implementation should take as much data from the initialization as it needs ignoring any data that it does not require.
      Parameters:
      mode - the mode to operate
      iv - the initiaization vector
      keydata - the key data
      Throws:
      IOException
    • transform

      void transform(byte[] data) throws IOException
      Transform the byte array according to the cipher mode.
      Parameters:
      data -
      Throws:
      IOException
    • transform

      void transform(byte[] src, int start, byte[] dest, int offset, int len) throws IOException
      Transform the byte array according to the cipher mode; it is legal for the source and destination arrays to reference the same physical array so care should be taken in the transformation process to safeguard this rule.
      Parameters:
      src -
      start -
      dest -
      offset -
      len -
      Throws:
      IOException
    • isMAC

      boolean isMAC()
    • getMacLength

      int getMacLength()
    • getProviderName

      String getProviderName()