public String computeHash(String serverid, byte[] sharedSecret, byte[] serverPublicKey ) {
		String resulthash = "";
		
		MessageDigest md;
		try {
			md = MessageDigest.getInstance("SHA1");
			md.update(serverid.getBytes());
			md.update(sharedSecret);
			md.update(serverPublicKey);
						
			byte[] hash = md.digest();
			
			if(hash[0] < 0) {
				resulthash += "-";
				
				for(int i = 0 ; i < hash.length ; i++) {
					hash[i] = (byte) ((~hash[i])&0xFF);
				}
				hash[hash.length-1] += 1;
				
			}
			
			for(int i = 0 ; i < hash.length ; i++) {
				if((hash[i]&0xF0) == 0 && i != 0) {
					resulthash += "0";
				}
				resulthash += Integer.toHexString((int) (hash[i]&0xFF));
			}
		} catch (NoSuchAlgorithmException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		
		
		return resulthash;
	}