public static long hash_sha1(String id){
		if(id==null){
			return -1;
		}
		long value = 0;
		byte[] bytes_value;
		try {
			MessageDigest md = MessageDigest.getInstance("SHA-1");
			md.reset();
			byte[] code = md.digest(id.getBytes());
			bytes_value = new byte[ChordNode.m/8];
			int shrink = code.length / bytes_value.length;
			int bitCount = 1;
			for (int j = 0; j < code.length * 8; j++) {
				int currBit = ((code[j / 8] & (1 << (j % 8))) >> j % 8);
				if (currBit == 1)
					bitCount++;
				if (((j + 1) % shrink) == 0) {
					int shrinkBit = (bitCount % 2 == 0) ? 0 : 1;
					bytes_value[j / shrink / 8] |= (shrinkBit << ((j / shrink) % 8));
					bitCount = 1;
				}
			}
			//value = bytes_values;
		} catch (Exception e) {
			e.printStackTrace();
			return -1l;
		}
		for (int i = 0; i < bytes_value.length; i++){
			value += bytes_value[i] << (8*i);
		}
		value = (value + (1<<ChordNode.m))%(1<<ChordNode.m);
		return value;
	}