Using MD5 may be overkill here. How expensive is it? How would it compare to doing an Arrays.hashCode() using the key,offset, and length?