Phoenix
Object-oriented orthogonally persistent operating system
Public Member Functions
Crc32 Class Reference

CCITT CRC32 implementation. More...

#include <crc.h>

List of all members.

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.

Detailed Description

CCITT CRC32 implementation.


Constructor & Destructor Documentation

Crc32::Crc32 ( u32  polynomial = 0x04c11db7)

Construct CRC calculator.

Parameters:
polynomialPolynomial value to use in calculations.

Member Function Documentation

u32 Crc32::Calculate ( void *  buf,
size_t  size,
u32  crc = 0xffffffff 
)

Calculate CRC for the buffer content.

Can be used incrementally.

Parameters:
bufBuffer with the data.
sizeSize of the buffer in bytes;
crcInitial value of CRC for the first call or previous returned value for the incremental call.
Returns:
CRC value for the data in the provided buffer.

The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines