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) – The maximum number of sequences to keep track of. After N unique sequences are received, each unique sequence that follows will cause the first (i.e. oldest) sequence to be dropped. Since a packet’s sequence can only have 256 different values, a ValueError is raised if the max size is set to 256 or greater.

Methods

reset()

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.