public final class WebSocketUtils extends Object
Modifier and Type | Field and Description |
---|---|
static String |
MAGIC_GUID |
Constructor and Description |
---|
WebSocketUtils() |
Modifier and Type | Method and Description |
---|---|
static byte[] |
createRandomBytes(int size) |
static int |
createRandomNumber(int min,
int max) |
static String |
getAcceptKey(String key) |
static String |
getKey() |
static byte[] |
md5(byte[] bytes) |
static byte[] |
sha1(byte[] bytes) |
public static final String MAGIC_GUID
public static String getKey()
public static String getAcceptKey(String key) throws UnsupportedEncodingException
UnsupportedEncodingException
public static byte[] md5(byte[] bytes)
public static byte[] sha1(byte[] bytes)
public static byte[] createRandomBytes(int size)
public static int createRandomNumber(int min, int max)
Copyright © 2016. All Rights Reserved.