AbstractRegister
Abstract base class / Interface a crc register needs to implement.
Workflow
- The Crc-Register needs to be initialized. 1 time (init)
- Data is feed into the crc register. 1..n times (update)
- 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. |