def METHOD_NAME(self, ciphertext, aad, iv, key):
    al = encode_int(len(aad) * 8, 64)
    msg = aad + iv + ciphertext + al
    d = hmac.new(key, msg, self.hash_alg).digest()
    return d[:self.key_len]