(data, length)
| 39 | |
| 40 | |
| 41 | def compute_crc24(data, length): |
| 42 | crc = CRC24_INIT |
| 43 | |
| 44 | for _ in range(length): |
| 45 | crc ^= (data & 0xff) << 16 |
| 46 | data >>= 8 |
| 47 | |
| 48 | for i in range(8): |
| 49 | crc <<= 1 |
| 50 | if crc & 0x1000000 != 0: |
| 51 | crc ^= CRC24_POLY |
| 52 | |
| 53 | return crc |
| 54 | |
| 55 | |
| 56 | def compute_crc32(data, value): |
no outgoing calls
no test coverage detected