Fix #epicfail bug in Hash util class

The Hash util class actually failed to hash anything, by calling
digest() with the data rather than update().  As such all hashes
produced were the default.

Correct this and add better tests to cover this condition.