Skip to content

AbstractRegister

Abstract base class / Interface a crc register needs to implement.

Workflow
  1. The Crc-Register needs to be initialized. 1 time (init)
  2. Data is feed into the crc register. 1..n times (update)
  3. Final result is calculated. 1 time (digest)

digest() abstractmethod

Final crc checksum will be calculated.

Returns:

Type Description
int

Final crc result/value (applies pending operations like final xor).

init() abstractmethod

Initializes the crc register.

reverse() abstractmethod

Calculates the reversed value of the crc register.

Returns:

Type Description
int

The reversed value of the crc register.

update(data) abstractmethod

Feeds data into the register.

Parameters:

Name Type Description Default
data bytes

which will be feed into the register.

required

Returns:

Type Description
int

Register content after the update.