public class AcceptHash
extends java.lang.Object
Sec-WebSocket-Key
and Sec-WebSocket-Accept
headers.
This is kept separate from Connection objects to facilitate difference in behavior between client and server, as well as making testing easier.
Modifier and Type | Field and Description |
---|---|
private static byte[] |
MAGIC
Globally Unique Identifier for use in WebSocket handshake within
Sec-WebSocket-Accept and Sec-WebSocket-Key http headers. |
Constructor and Description |
---|
AcceptHash() |
Modifier and Type | Method and Description |
---|---|
static java.lang.String |
hashKey(java.lang.String key)
Concatenate the provided key with the Magic GUID and return the Base64 encoded form.
|