Here you can find the source of calculateHashCode(byte a[])
private static int calculateHashCode(byte a[])
//package com.java2s; //License from project: Apache License public class Main { private static int calculateHashCode(byte a[]) { if (a == null) return 0; int result = 1; for (byte b : a) { result = 31 * result + b;/*from w w w .j a va2 s . c om*/ } return result; } }