Add tests and fixes to make sure changing the algorithm breaks the hash