public static String getKey(String key) {  
	       // CHROME WEBSOCKET VERSION 8中定义的GUID，详细文档地址：http://tools.ietf.org/html/draft-ietf-hybi-thewebsocketprotocol-10  
	       String guid = "258EAFA5-E914-47DA-95CA-C5AB0DC85B11";
	       key += guid;
	       log.info(key);
	       try {  
	           MessageDigest md = MessageDigest.getInstance("SHA-1");  
	           md.update(key.getBytes("iso-8859-1"), 0, key.length());  
	           byte[] sha1Hash = md.digest();  
	           key = base64Encode(sha1Hash);  
	       } catch (NoSuchAlgorithmException e) {  
	           e.printStackTrace();  
	       } catch (UnsupportedEncodingException e) {  
	            e.printStackTrace();
	       }  
	       return key;  
	   }