![]() |
librnr
1.14.5
RoadNarrows Robotics Common Library 1
|
Checksum algorithms. More...
Go to the source code of this file.
Macros | |
| #define | CRC32_POLY_NORM 0x04c11db7 |
| 32-bit crc in normal (MSB) form | |
Functions | |
| u8_t | generate_checksum8 (byte_t buf[], size_t len) |
| Computes the modular 8-bit checksum over buffer. More... | |
| u16_t | generate_checksum16 (byte_t buf[], size_t len) |
| Computes the modular 16-bit checksum over buffer. More... | |
| u32_t | generate_checksum32 (byte_t buf[], size_t len) |
| Computes the modular 32-bit checksum over buffer. More... | |
| u32_t | generate_crc32 (byte_t buf[], size_t len) |
| Computes the 32-bit cyclic redundance check over buffer. More... | |
Checksum algorithms.
—
Definition in file checksum.h.
Computes the modular 16-bit checksum over buffer.
The two's complitment is not taken.
| buf | Buffer to checksum. |
| len | Number of bytes in buf. |
Definition at line 113 of file checksum.c.
Referenced by profile().
Computes the modular 32-bit checksum over buffer.
The two's complitment is not taken.
| buf | Buffer to checksum |
| len | Number of bytes in buf. |
Definition at line 126 of file checksum.c.
Referenced by profile().
Computes the modular 8-bit checksum over buffer.
The two's complitment is not taken.
| buf | Buffer to checksum. |
| len | Number of bytes in buf. |
Definition at line 100 of file checksum.c.
Referenced by profile().
Computes the 32-bit cyclic redundance check over buffer.
CRC polynomial: 0x04C11DB7 (normal representation).
This CRC-32 is used by Ethernet, MPEG-2, gzip, gzip2, and others.
| width | 32 |
| poly | 0x04c11db7 |
| init | 0xffffffff |
| refin | false |
| refout | false |
| xorout | true |
| buf | Buffer to checksum |
| len | Number of bytes in buf. |
Definition at line 139 of file checksum.c.
Referenced by profile().