public static Key distance(Key a,Key b){
  Key x=new Key();
  for (int i=0; i < a.hash.length; i++) {
    x.hash[i]=(byte)(a.hash[i] ^ b.hash[i]);
  }
  return x;
}

public static Key distance ( Key a , Key b ) { Key x = new Key ( ) ; for ( int i = 0 ; i < a . hash . length ; i ++ ) { x . hash [ i ] = ( byte ) ( a . hash [ i ] ^ b . hash [ i ] ) ; } return x ; }
calculates the distance between two keys . the distance is basically a xor of both key hashes .
