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 Lockprivate final org.slf4j.Loggerprivate final RandomFields inherited from class net.schmizz.sshj.transport.Converter
authed, authMode, cipher, cipherSize, compression, etm, mac, seq -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidaeadOutgoingBuffer(Buffer<?> buf, int offset, int len) private void(package private) longEncode a buffer into the SSH binary protocol per the current algorithms.(package private) Compression.Modeprivate void(package private) voidsetAlgorithms(Cipher cipher, MAC mac, Compression compression) (package private) voidMethods 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:
setAlgorithmsin classConverter
-
setAuthenticated
void setAuthenticated()- Overrides:
setAuthenticatedin classConverter
-
getCompressionType
Compression.Mode getCompressionType()- Specified by:
getCompressionTypein classConverter
-