Unify api of HMac implementation.