Add hashCode function for client side exercises.