Package org.bouncycastle.tls
Class ServerHello
java.lang.Object
org.bouncycastle.tls.ServerHello
-
Constructor Summary
ConstructorDescriptionServerHello
(byte[] sessionID, int cipherSuite, Hashtable extensions) ServerHello
(ProtocolVersion version, byte[] random, byte[] sessionID, int cipherSuite, Hashtable extensions) -
Method Summary
Modifier and TypeMethodDescriptionvoid
encode
(TlsContext context, OutputStream output) Encode thisServerHello
to anOutputStream
.int
byte[]
byte[]
boolean
static ServerHello
parse
(ByteArrayInputStream input) Parse aServerHello
from aByteArrayInputStream
.
-
Constructor Details
-
ServerHello
-
ServerHello
public ServerHello(ProtocolVersion version, byte[] random, byte[] sessionID, int cipherSuite, Hashtable extensions)
-
-
Method Details
-
getCipherSuite
public int getCipherSuite() -
getExtensions
-
getRandom
public byte[] getRandom() -
getSessionID
public byte[] getSessionID() -
getVersion
-
isHelloRetryRequest
public boolean isHelloRetryRequest() -
encode
Encode thisServerHello
to anOutputStream
.- Parameters:
context
- theTlsContext
of the current connection.output
- theOutputStream
to encode to.- Throws:
IOException
-
parse
Parse aServerHello
from aByteArrayInputStream
.- Parameters:
input
- theByteArrayInputStream
to parse from.- Returns:
- a
ServerHello
object. - Throws:
IOException
-