Class AuthenticationMessage
java.lang.Object
com.github.jh3nd3rs0n.jargyle.protocolbase.socks5.gssapimethod.AuthenticationMessage
A message sent by the client or the server during the authentication
process.
-
Field Summary
Modifier and TypeFieldDescriptionstatic final UnsignedByte
TheUnsignedByte
associated with this type of message.static final byte
Thebyte
value associated with this type of message. -
Method Summary
Modifier and TypeMethodDescriptionboolean
Returns theUnsignedByte
associated with this type of message.getToken()
Returns theToken
of thisAuthenticationMessage
.Returns theVersion
of thisAuthenticationMessage
.int
hashCode()
static AuthenticationMessage
newInstance
(Token tkn) Returns a newAuthenticationMessage
with the providedToken
.static AuthenticationMessage
Returns a newAuthenticationMessage
from the providedInputStream
from the client.static AuthenticationMessage
Returns a newAuthenticationMessage
from the providedInputStream
from the server.byte[]
Returns thebyte
array of thisAuthenticationMessage
.toString()
Returns theString
representation of thisAuthenticationMessage
.
-
Field Details
-
MESSAGE_TYPE_BYTE_VALUE
public static final byte MESSAGE_TYPE_BYTE_VALUEThebyte
value associated with this type of message.- See Also:
-
MESSAGE_TYPE
TheUnsignedByte
associated with this type of message.
-
-
Method Details
-
newInstance
Returns a newAuthenticationMessage
with the providedToken
.- Parameters:
tkn
- the providedToken
- Returns:
- a new
AuthenticationMessage
with the providedToken
-
newInstanceFromClient
Returns a newAuthenticationMessage
from the providedInputStream
from the client. AnEOFException
is thrown if the end of the providedInputStream
is reached.- Parameters:
in
- the providedInputStream
from the client- Returns:
- a new
AuthenticationMessage
- Throws:
IOException
- if the end of the providedInputStream
is reached (EOFException
) or if an I/O error occurs
-
newInstanceFromServer
Returns a newAuthenticationMessage
from the providedInputStream
from the server. AnAbortMessageException
is thrown if anAbortMessage
is received. AnEOFException
is thrown if the end of the providedInputStream
is reached.- Parameters:
in
- the providedInputStream
from the server- Returns:
- a new
AuthenticationMessage
- Throws:
IOException
- if anAbortMessage
is received (AbortMessageException
), if the end of the providedInputStream
is reached (EOFException
), or if an I/O error occurs
-
equals
-
getMessageType
Returns theUnsignedByte
associated with this type of message.- Returns:
- the
UnsignedByte
associated with this type of message
-
getToken
Returns theToken
of thisAuthenticationMessage
.- Returns:
- the
Token
of thisAuthenticationMessage
-
getVersion
Returns theVersion
of thisAuthenticationMessage
.- Returns:
- the
Version
of thisAuthenticationMessage
-
hashCode
public int hashCode() -
toByteArray
public byte[] toByteArray()Returns thebyte
array of thisAuthenticationMessage
.- Returns:
- the
byte
array of thisAuthenticationMessage
-
toString
Returns theString
representation of thisAuthenticationMessage
.
-