/**
 * A vanilla XOR hashCode of all the bytes in an array. This gives only a signed 8-bit result.
 * @param val array of bytes to hash
 * @return a hash code value for the byte[] val byte array.
 */
public static int hashCode( byte[] val )
   {
   //  byte[] val  holds the data.
   int hash = 0;
   final int len = val.length();
   for ( int i=0; i<len; i++ )
      {
      hash ^= val[ i ];
      }
   return hash;
   }