Authcode calculation improvements