Package net.schmizz.sshj.transport
Class Encoder
java.lang.Object
net.schmizz.sshj.transport.Converter
net.schmizz.sshj.transport.Encoder
Encodes packets into the SSH binary protocol per the current algorithms.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Lock
private final org.slf4j.Logger
private final Random
Fields inherited from class net.schmizz.sshj.transport.Converter
authed, authMode, cipher, cipherSize, compression, etm, mac, seq
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected void
aeadOutgoingBuffer
(Buffer<?> buf, int offset, int len) private void
(package private) long
Encode a buffer into the SSH binary protocol per the current algorithms.(package private) Compression.Mode
private void
(package private) void
setAlgorithms
(Cipher cipher, MAC mac, Compression compression) (package private) void
Methods inherited from class net.schmizz.sshj.transport.Converter
getSequenceNumber, isSequenceNumberAtMax, resetSequenceNumber, usingCompression
-
Field Details
-
log
private final org.slf4j.Logger log -
prng
-
encodeLock
-
-
Constructor Details
-
Encoder
Encoder(Random prng, Lock encodeLock, LoggerFactory loggerFactory)
-
-
Method Details
-
compress
-
putMAC
-
encode
Encode a buffer into the SSH binary protocol per the current algorithms.- Parameters:
buffer
- the buffer to encode- Returns:
- the sequence no. of encoded packet
-
aeadOutgoingBuffer
-
setAlgorithms
- Overrides:
setAlgorithms
in classConverter
-
setAuthenticated
void setAuthenticated()- Overrides:
setAuthenticated
in classConverter
-
getCompressionType
Compression.Mode getCompressionType()- Specified by:
getCompressionType
in classConverter
-