public class SecKey
extends java.lang.Object
WebSocket's security key, used during the handshake phase.| Modifier and Type | Field and Description |
|---|---|
static int |
KEY_SIZE |
| Constructor and Description |
|---|
SecKey() |
SecKey(java.lang.String base64) |
| Modifier and Type | Method and Description |
|---|---|
static SecKey |
generateServerKey(SecKey clientKey)
Generate server-side security key, which gets passed to the client during
the handshake phase as part of message payload.
|
byte[] |
getBytes() |
java.lang.String |
getSecKey()
Gets security key string representation, which includes chars and spaces.
|
java.lang.String |
toString() |
void |
validateServerKey(java.lang.String serverKey) |
public static final int KEY_SIZE
public static SecKey generateServerKey(SecKey clientKey) throws HandshakeException
clientKey - client's Sec-WebSocket-KeyHandshakeExceptionpublic java.lang.String getSecKey()
public java.lang.String toString()
toString in class java.lang.Objectpublic byte[] getBytes()
public void validateServerKey(java.lang.String serverKey)
Copyright © 2018 Oracle Corporation. All Rights Reserved.