tools/smaz: add support for hash function generation