Phoenix
Object-oriented orthogonally persistent operating system
|
CCITT CRC32 implementation. More...
#include <crc.h>
Public Member Functions | |
Crc32 (u32 polynomial=0x04c11db7) | |
Construct CRC calculator. | |
u32 | Calculate (void *buf, size_t size, u32 crc=0xffffffff) |
Calculate CRC for the buffer content. |
CCITT CRC32 implementation.
Crc32::Crc32 | ( | u32 | polynomial = 0x04c11db7 | ) |
Construct CRC calculator.
polynomial | Polynomial value to use in calculations. |
Calculate CRC for the buffer content.
Can be used incrementally.
buf | Buffer with the data. |
size | Size of the buffer in bytes; |
crc | Initial value of CRC for the first call or previous returned value for the incremental call. |