Here you can find the source of hashCode(byte[] data)
public static int hashCode(byte[] data)
//package com.java2s; public class Main { public static int hashCode(byte[] data) { if (data == null) { return 0; }/*from w w w. ja va 2 s .co m*/ int i = data.length; int hc = i + 1; while (--i >= 0) { hc *= 257; hc ^= data[i]; } return hc; } }