![]() |
PIP 5.6.1
Platform-Independent Primitives
|
Generic table-driven CRC calculator for a polynomial width L. More...
#include <picrc.h>
Public Member Functions | |
| PICRC (const N &poly=N()) | |
| Constructs a calculator with the specified polynomial and default CRC conventions. | |
| PICRC (const N &poly, bool reverse_poly_, const N &initial, const N &out_xor) | |
| Constructs a calculator with fully specified initialization parameters. | |
| void | setInitial (const N &v) |
| Sets the initial CRC value. | |
| void | setOutXor (const N &v) |
| Sets the final XOR value. | |
| void | setReversePolynome (bool yes) |
| Enables or disables polynomial bit reversal and rebuilds the lookup table. | |
| void | setReverseOutBeforeXOR (bool yes) |
| Reverses the resulting CRC before applying the output XOR. | |
| void | setReverseDataBytes (bool yes) |
| Reverses bits in each input byte before processing. | |
| void | initTable () |
| Rebuilds the 256-entry lookup table for the current polynomial settings. | |
| N | calculate (const void *data, int size) |
| Calculates CRC for a raw memory block. | |
| N | calculate (const PIByteArray &d) |
| Calculates CRC for a byte array. | |
| N | calculate (const char *str) |
| Calculates CRC for a null-terminated string. | |
Generic table-driven CRC calculator for a polynomial width L.