Class AbstractSession.MessageCodingSettings
- java.lang.Object
-
- org.apache.sshd.common.session.helpers.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 Summary
Fields Modifier and Type Field Description private Cipher
cipher
private Compression
compression
private byte[]
iv
private byte[]
key
private Mac
mac
private Cipher.Mode
mode
-
Constructor Summary
Constructors Constructor Description MessageCodingSettings(Cipher cipher, Mac mac, Compression compression, Cipher.Mode mode, byte[] key, byte[] iv)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Cipher
getCipher(long packetSequenceNumber)
Get theCipher
.Compression
getCompression()
Mac
getMac()
private void
initCipher(long packetSequenceNumber)
-
-
-
Field Detail
-
cipher
private final Cipher cipher
-
mac
private final Mac mac
-
compression
private final Compression compression
-
mode
private final Cipher.Mode mode
-
key
private byte[] key
-
iv
private byte[] iv
-
-
Constructor Detail
-
MessageCodingSettings
public MessageCodingSettings(Cipher cipher, Mac mac, Compression compression, Cipher.Mode mode, byte[] key, byte[] iv)
-
-
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 theCipher
.- Parameters:
packetSequenceNumber
- SSH packet sequence number for initializing the cipher. PassAbstractSession.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()
-
getCompression
public Compression getCompression()
-
-