CRC Utilities

CRC (Cyclic Redundancy Check) calculation utilities for L2 protocol data integrity verification.

class tropicsquare.crc.CRC[source]

Bases: object

CRC16_POLYNOMIAL = 32773
CRC16_INITIAL_VAL = 0
CRC16_FINAL_XOR_VALUE = 0
classmethod crc16(data)[source]

Compute the CRC16 value for the given byte sequence.

Parameters:

data (bytes)

Return type:

bytes

See Also