Function hpke::IncrementSeq
source · [−]Expand description
Increment Sequence
Each encryption or decryption operation increments the sequence number for the context in use.
def Context<ROLE>.IncrementSeq():
if self.seq >= (1 << (8*Nn)) - 1:
raise MessageLimitReachedError
self.seq += 1