public static int hashBytes ( byte [ ] bytes , int offset , int length ) { int hash = 1 ; for ( int i = offset ; i < offset + length ; i ++ ) { hash = ( 31 * hash ) + bytes [ i ] ; } return hash ; }
Compute hash for binary data .