private String makeSig(String url, String data) {

		ArrayList<Character> tmp = new ArrayList<Character>(36);
		for (char c = 'a'; c <= 'z'; c += 1) {
			tmp.add(c);
		}
		for (char c = '0'; c <= '9'; c += 1) {
			tmp.add(c);
		}
		Collections.shuffle(tmp);
		String nonce = new String();

		for (Character c : tmp.subList(0, 8)) {
			nonce += c;
		}

		int client_time = (int) (System.currentTimeMillis() / 1000);
		String delim = "||";
		String msg = this.user + delim + url.toLowerCase() + delim + nonce
				+ delim + client_time + delim;
		System.out.println(msg);
		if (null != data) {
			msg = msg += data;
		}

		Mac mac = null;
		try {
			SecretKeySpec key = new SecretKeySpec(this.pass.getBytes("UTF-8"),
					"HmacSHA256");
			mac = Mac.getInstance("HmacSHA256");
			mac.init(key);
		} catch (NoSuchAlgorithmException | UnsupportedEncodingException
				| InvalidKeyException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}

		byte[] digest = mac.doFinal(msg.getBytes());
		String sig = "";
		String hex = "";
		for (byte b : digest) {
			// need one byte, so the last two hex digits of the Integer
			hex = Integer.toHexString(0xff & b);
			// we get no leading zeros!
			if (hex.length() == 1) {
				sig += "0";
			}
			sig += hex;
		}
		System.out.println(sig);
		String auth_header = "ChargeOver co_public_key=\""
				+ this.user
				+ "\" co_nonce=\""
				+ nonce
				+ "\" co_timestamp=\""
				+ client_time
				+ "\" co_signature_method=\"HMAC-SHA256\" co_version=\"1.0\" co_signature=\""
				+ sig + "\"";
		System.out.println(auth_header);
		return auth_header;
	}