Class AbstractSession.MessageCodingSettings

  • Enclosing class:
    AbstractSession

    protected static class AbstractSession.MessageCodingSettings
    extends java.lang.Object
    Message encoding or decoding settings as determined at the end of a key exchange.
    • Field Detail

      • cipher

        private final Cipher cipher
      • mac

        private final Mac mac
      • key

        private byte[] key
      • iv

        private byte[] iv
    • Constructor Detail

    • Method Detail

      • initCipher

        private void initCipher​(long packetSequenceNumber)
                         throws java.lang.Exception
        Throws:
        java.lang.Exception
      • getCipher

        public Cipher getCipher​(long packetSequenceNumber)
                         throws java.lang.Exception
        Get the Cipher.
        Parameters:
        packetSequenceNumber - SSH packet sequence number for initializing the cipher. Pass AbstractSession.seqo if the cipher is to be used for output, AbstractSession.seqi otherwise.
        Returns:
        the fully initialized cipher
        Throws:
        java.lang.Exception - if the cipher cannot be initialized
      • getMac

        public Mac getMac()