protected static class AbstractSession.MessageCodingSettings
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private Cipher |
cipher |
private Compression |
compression |
private byte[] |
iv |
private byte[] |
key |
private Mac |
mac |
private Cipher.Mode |
mode |
Constructor and Description |
---|
MessageCodingSettings(Cipher cipher,
Mac mac,
Compression compression,
Cipher.Mode mode,
byte[] key,
byte[] iv) |
Modifier and Type | Method and Description |
---|---|
Cipher |
getCipher(long packetSequenceNumber)
Get the
Cipher . |
Compression |
getCompression() |
Mac |
getMac() |
private void |
initCipher(long packetSequenceNumber) |
private final Cipher cipher
private final Mac mac
private final Compression compression
private final Cipher.Mode mode
private byte[] key
private byte[] iv
public MessageCodingSettings(Cipher cipher, Mac mac, Compression compression, Cipher.Mode mode, byte[] key, byte[] iv)
private void initCipher(long packetSequenceNumber) throws java.lang.Exception
java.lang.Exception
public Cipher getCipher(long packetSequenceNumber) throws java.lang.Exception
Cipher
.packetSequenceNumber
- SSH packet sequence number for initializing the cipher. Pass AbstractSession.seqo
if
the cipher is to be used for output, AbstractSession.seqi
otherwise.java.lang.Exception
- if the cipher cannot be initializedpublic Mac getMac()
public Compression getCompression()