berconpy.NonceCheck

class berconpy.NonceCheck(max_size)

Bases: object

A simple check that verifies the Packet.sequence has not been recently seen before.

Parameters:

max_size (int) – Specifies the max size to use for the internal deque to keep track of indices. Since the range of a packet’s sequence is only 256, a max size matching or exceeding that will eventually lead to this check infinitely returning False, and as such a :py:exc`:ValueError is raised to prevent that from occurring.

Methods

reset()

rtype:

None

Attributes

max_size

The maximum number of sequences that the check can keep track of.

deque

property max_size: int

The maximum number of sequences that the check can keep track of.