This also adjusts the current hash/hmac functions to have a consistent interface allowing easier switching/testing.