src/main/java/org/jboss/util/HashCode.java
public static int generate(final byte[] bytes) {
      int hashcode = 0;

      for (int i=0; i<bytes.length; i++) {
         hashcode <<= 1;
         hashcode ^= bytes[i];
      } 

      return hashcode;
   }
public static int generate(final byte[] bytes) {
      int hashcode = 0;

      for (int i=0; i<bytes.length; i++) {
         hashcode <<= 1;
         hashcode ^= bytes[i];
      } 

      return hashcode;
   }
Generate a hash code for a byte array.

@param bytes   An array of bytes to generate a hash code from.
@return        Hash code.