Make sure we don't shift signed integers left by 24. They should be unsigned.
hmac: Fixed crashes on CPUs that don't allow unaligned memory access.
lib: Generalize hmac to be hash independent