This class is needed because ByteArray's equality is by object, not contents. So ByteArrays probably do not work as you expect as the key in any map-like data structures, for example.
this non-cryptographic hash just xors every 4th byte together and then returns the resulting 4 bytes as an Int. hashCode should be fast and preferably have low collisions, but does not need to have crypto properties.