'Verify an incoming MAC using the incoming MAC values.
@type seqid: L{int}
@param seqid: The sequence ID of the incoming packet.
@type data: L{bytes}
@param data: The packet data to verify.
@type mac: L{bytes}
@param mac: The MAC sent with the packet.
@rtype: L{bool}
@return: C{True} if the MAC is valid.'

def verify(self, seqid, data, mac):

    if (not self.inMAC[0]):
        return (mac == '')
    data = (struct.pack('>L', seqid) + data)
    outer = hmac.HMAC(self.inMAC.key, data, self.inMAC[0]).digest()
    return (mac == outer)
