Work on hmac and unit tests