Make hash function configurable.