private byte[] computeHash(TreeMap<ByteBuffer, Object> info) {
		try {
			Bencode b = new Bencode();
			b.setRootElement(info);
			MessageDigest md = MessageDigest.getInstance("SHA1");
			ByteArrayOutputStream out = new ByteArrayOutputStream();
			b.print(out);
			md.update(ByteBuffer.wrap(out.toByteArray()));
			return md.digest();
		} catch (NoSuchAlgorithmException e) {
			e.printStackTrace();
		} catch (IOException e) {
			e.printStackTrace();
		}

		return null;
	}