KallistiOS git master
Independent SDK for the Sega Dreamcast
Loading...
Searching...
No Matches

API for Cyclic Redundancy Checking More...

Functions

uint32 net_crc32le (const uint8 *data, int size)
 Calculate a "little-endian" CRC-32 over a block of data.
 
uint32 net_crc32be (const uint8 *data, int size)
 Calculate a "big-endian" CRC-32 over a block of data.
 
uint16 net_crc16ccitt (const uint8 *data, int size, uint16 start)
 Calculate a CRC16-CCITT over a block of data.
 

Detailed Description

API for Cyclic Redundancy Checking

Function Documentation

◆ net_crc16ccitt()

uint16 net_crc16ccitt ( const uint8 * data,
int size,
uint16 start )

Calculate a CRC16-CCITT over a block of data.

Note
Based on code found online at http://www.ccsinfo.com/forum/viewtopic.php?t=24977
Parameters
dataThe data to calculate over.
sizeThe size of the data, in bytes.
startThe value to start with. This could be a previous return value from this function (if continuing a previous calculation) or some initial seed value (typically 0xFFFF or 0x0000).
Returns
The calculated CRC16-CCITT.

◆ net_crc32be()

uint32 net_crc32be ( const uint8 * data,
int size )

Calculate a "big-endian" CRC-32 over a block of data.

Parameters
dataThe data to calculate over.
sizeThe size of the data, in bytes.
Returns
The calculated CRC-32.

◆ net_crc32le()

uint32 net_crc32le ( const uint8 * data,
int size )

Calculate a "little-endian" CRC-32 over a block of data.

Parameters
dataThe data to calculate over.
sizeThe size of the data, in bytes.
Returns
The calculated CRC-32.