Refactored the hmac base classes