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
7#ifndef LIBA_CRC_H
8#define LIBA_CRC_H
9
10#include "a.h"
11
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
47#endif /* a/crc.h */
algorithm library
#define a_size
Definition a.h:610
#define a_u8
Definition a.h:424
#define a_u16
Definition a.h:457
#define a_u32
Definition a.h:490
#define a_u64
Definition a.h:523