@SuppressWarnings("serial")
	private void vali() throws NoSuchAlgorithmException, IOException {
		
		List<String> list = new ArrayList<String>();
		SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMddhhmmss");
		
		final String token = mainForm.getInputToken().getText();
		final String timestamp = sdf.format(new Date());
		Double non = Math.random()*99999;
		final String nonce = String.valueOf(non.intValue());
		
		list.add(token);
		list.add(timestamp);
		list.add(nonce);
		
		Collections.sort(list);
		
		StringBuilder joinstr = new StringBuilder();
		for (String string : list) {
			joinstr.append(string);
		}
		
		MessageDigest md = MessageDigest.getInstance("SHA-1");
		md.update(joinstr.toString().getBytes());
		byte[] digest = md.digest();
		
		StringBuilder sha = new StringBuilder();
		for (byte b : digest) {
			String hexValue = Integer.toHexString(b >= 0 ? b : 256 + b);
			if(hexValue.length()<2){
				hexValue = "0" + hexValue;
			}
			sha.append(hexValue);
		}
		
		final String signature = sha.toString();
		
		
		List<UrlConnectionUtil.Parameter> params = 
			new ArrayList<UrlConnectionUtil.Parameter>(){{
			add(Parameter.newInstance("token", token));
			add(Parameter.newInstance("timestamp", timestamp));
			add(Parameter.newInstance("nonce", nonce));
			add(Parameter.newInstance("signature", signature));
			add(Parameter.newInstance("echostr", "vali ok"));
		}};
		
		URL url = new URL(this.mainForm.getInputUrl().getText() + "?" + UrlConnectionUtil.buildParameterStr(params));
		URLConnection con = url.openConnection();
		con.connect();
		StringBuilder resp = new StringBuilder();
		BufferedReader reader = new BufferedReader(new InputStreamReader(
				con.getInputStream()));
		try {
			for (String line = reader.readLine(); line != null; line = reader
					.readLine()) {
				resp.append(line);
			}
		} catch (Exception e) {
			e.printStackTrace();
		} finally {
			if (reader != null)
				reader.close();
		}
		this.mainForm.appendNewLine("result = " + resp.toString());
	}