java.lang.Object
org.glassfish.grizzly.websockets.SecKey
Class represents
WebSocket's security key, used during the handshake phase.- Author:
- Alexey Stashok
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic SecKeygenerateServerKey(SecKey clientKey) Generate server-side security key, which gets passed to the client during the handshake phase as part of message payload.byte[]getBytes()Gets security key string representation, which includes chars and spaces.toString()voidvalidateServerKey(String serverKey)
-
Field Details
-
KEY_SIZE
public static final int KEY_SIZE- See Also:
-
-
Constructor Details
-
SecKey
public SecKey() -
SecKey
-
-
Method Details
-
generateServerKey
Generate server-side security key, which gets passed to the client during the handshake phase as part of message payload.- Parameters:
clientKey- client's Sec-WebSocket-Key- Returns:
- server key.
- Throws:
HandshakeException
-
getSecKey
Gets security key string representation, which includes chars and spaces.- Returns:
- Security key string representation, which includes chars and spaces.
-
toString
-
getBytes
public byte[] getBytes() -
validateServerKey
-