int (byte[] contentHash) { int hashCode = 0; // take first 4 bytes, this should be good enough hash given we reference git revisions with 7-8 hex digits for (int i = 0; i < 4; i++) { hashCode = (hashCode << 8) + (contentHash[i] & 0xFF); } return hashCode; }