Fixed HMAC and added new CommonService function