Turnstone Operating System
Loading...
Searching...
No Matches
crc.64.c File Reference

CRC32 implementation. More...

#include <crc.h>

Functions

 MODULE ("turnstone.lib")
 
void crc32_init_table (void)
 initialize crc32 tables for fast calculation
 
uint32_t crc32_sum (uint8_t *p, uint32_t bytelength, uint32_t init)
 calculates crc32 sum More...
 

Variables

uint32_t crc32_table [256] = {}
 

Detailed Description

CRC32 implementation.

This work is licensed under TURNSTONE OS Public License. Please read and understand latest version of Licence.

Function Documentation

◆ crc32_sum()

uint32_t crc32_sum ( uint8_t p,
uint32_t  bytelength,
uint32_t  init 
)

calculates crc32 sum

Parameters
[in]pinput data
[in]bytelengthinput length
[in]initCRC32_SEED or previous sum
Returns
pre crc32 sum, for finishing it should be xor'ed with CRC32_SEED