Here you can find the source of hash(byte[] bytes)
public static int hash(byte[] bytes)
//package com.java2s; // BSD License (http://lemurproject.org/galago-license) public class Main { public static int hash(byte b) { return ((int) b) & 0xFF; }/* w w w . j av a 2s. c o m*/ public static int hash(int i) { return i; } public static int hash(long l) { return (int) l; } public static int hash(double d) { return (int) (d * 100000); } public static int hash(float f) { return (int) (f * 100000); } public static int hash(String s) { return s.hashCode(); } public static int hash(byte[] bytes) { int h = 0; for (byte b : bytes) { h += 7 * h + b; } return h; } }