Yet Another eXchange Tool 0.11.3
Loading...
Searching...
No Matches
Functions | Variables
cksum.c File Reference
#include <inttypes.h>
#include <stdlib.h>
#include <sys/types.h>
#include "cksum.h"
Include dependency graph for cksum.c:

Go to the source code of this file.

Functions

uint32_t SymPrefix memcrc (const unsigned char *b, size_t n)
 
void SymPrefix memcrc_r (uint32_t *state, const unsigned char *block, size_t block_len)
 
void SymPrefix memcrc_r_eswap (uint32_t *state, const unsigned char *elems, size_t num_elems, size_t elem_size)
 
uint32_t SymPrefix memcrc_finish (uint32_t *state, off_t total_size)
 

Variables

static const uint32_t crctab []
 

Detailed Description

--- provide composable implementation of crc32 algorithm

Version: 1.0

Author
Jörg Behrens behre.nosp@m.ns@d.nosp@m.krz.d.nosp@m.e Moritz Hanke hanke.nosp@m.@dkr.nosp@m.z.de Thomas Jahns jahns.nosp@m.@dkr.nosp@m.z.de

Definition in file cksum.c.

Function Documentation

◆ memcrc()

uint32_t SymPrefix memcrc ( const unsigned char * b,
size_t n )

Definition at line 115 of file cksum.c.

Here is the call graph for this function:

◆ memcrc_finish()

uint32_t SymPrefix memcrc_finish ( uint32_t * state,
off_t total_size )

Definition at line 219 of file cksum.c.

◆ memcrc_r()

void SymPrefix memcrc_r ( uint32_t * state,
const unsigned char * block,
size_t block_len )

Definition at line 139 of file cksum.c.

Here is the caller graph for this function:

◆ memcrc_r_eswap()

void SymPrefix memcrc_r_eswap ( uint32_t * state,
const unsigned char * elems,
size_t num_elems,
size_t elem_size )

Does endian-swapping prior to checksumming in case platform is big-endian

Parameters
statecontains the check accumulator, should be initialized to a defined value like 0
elemspoints to first first element with alignment elem_size
num_elemsnumber of elements to process
elem_sizesize of each element in bytes

Definition at line 187 of file cksum.c.

Here is the call graph for this function:

Variable Documentation

◆ crctab

const uint32_t crctab[]
static

Definition at line 58 of file cksum.c.