Support for custom hash functions.