Refactored out hashing functions to their own file.
Fixed issue where HMAC signing was generating the wrong size buffer.