def valid_packet(packet, constraint):
    """
        Check if a hex encoded packet received from
        rflib.Rfcat.RFrecv has the constraint value in it.

        Idea From:
            https://github.com/mossmann/stealthlock/blob/master/sl.py#L17

        :param packet:
        :param constraint:
        :return:
    """

    if constraint not in packet:
        return False

    return True