Allow users to implement their own hash function