Add a rehasher for legacy hashes