Clean up HashAlgorithm a bit.