liba 0.1.15
An algorithm library based on C/C++
 
Loading...
Searching...
No Matches
crc.h
Go to the documentation of this file.
1
6
7#ifndef LIBA_CRC_H
8#define LIBA_CRC_H
9
10#include "a.h"
11
17
18#if defined(__cplusplus)
19extern "C" {
20#endif /* __cplusplus */
21
22A_EXTERN void a_crc8m_init(a_u8 table[0x100], a_u8 poly);
23A_EXTERN void a_crc8l_init(a_u8 table[0x100], a_u8 poly);
24A_EXTERN a_u8 a_crc8(a_u8 const table[0x100], void const *pdata, a_size nbyte, a_u8 value);
25
26A_EXTERN void a_crc16l_init(a_u16 table[0x100], a_u16 poly);
27A_EXTERN void a_crc16m_init(a_u16 table[0x100], a_u16 poly);
28A_EXTERN a_u16 a_crc16l(a_u16 const table[0x100], void const *pdata, a_size nbyte, a_u16 value);
29A_EXTERN a_u16 a_crc16m(a_u16 const table[0x100], void const *pdata, a_size nbyte, a_u16 value);
30
31A_EXTERN void a_crc32l_init(a_u32 table[0x100], a_u32 poly);
32A_EXTERN void a_crc32m_init(a_u32 table[0x100], a_u32 poly);
33A_EXTERN a_u32 a_crc32l(a_u32 const table[0x100], void const *pdata, a_size nbyte, a_u32 value);
34A_EXTERN a_u32 a_crc32m(a_u32 const table[0x100], void const *pdata, a_size nbyte, a_u32 value);
35
36A_EXTERN void a_crc64l_init(a_u64 table[0x100], a_u64 poly);
37A_EXTERN void a_crc64m_init(a_u64 table[0x100], a_u64 poly);
38A_EXTERN a_u64 a_crc64l(a_u64 const table[0x100], void const *pdata, a_size nbyte, a_u64 value);
39A_EXTERN a_u64 a_crc64m(a_u64 const table[0x100], void const *pdata, a_size nbyte, a_u64 value);
40
41#if defined(__cplusplus)
42} /* extern "C" */
43#endif /* __cplusplus */
44
46
47#endif /* a/crc.h */
algorithm library
unsigned long a_u64
unsigned integer type with width of exactly 64 bits
Definition a.h:627
unsigned char a_u8
unsigned integer type with width of exactly 8 bits
Definition a.h:442
unsigned short a_u16
unsigned integer type with width of exactly 16 bits
Definition a.h:486
unsigned long a_u32
unsigned integer type with width of exactly 32 bits
Definition a.h:538
size_t a_size
unsigned integer type returned by the sizeof operator
Definition a.h:823