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.ObjectMessage encoding or decoding settings as determined at the end of a key exchange.
-
-
Field Summary
Fields Modifier and Type Field Description private Ciphercipherprivate Compressioncompressionprivate byte[]ivprivate byte[]keyprivate Macmacprivate Cipher.Modemode
-
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 CiphergetCipher(long packetSequenceNumber)Get theCipher.CompressiongetCompression()MacgetMac()private voidinitCipher(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.seqoif the cipher is to be used for output,AbstractSession.seqiotherwise.- Returns:
- the fully initialized cipher
- Throws:
java.lang.Exception- if the cipher cannot be initialized
-
getMac
public Mac getMac()
-
getCompression
public Compression getCompression()
-
-