a good compromise between speed and validity to hash strings