20#define CRC32_CCITT_SEED 0xFFFFFFFF
21#define CRC32C_PRELOAD 0xffffffff
22#define CRC32_MPEG2_SEED 0xFFFFFFFF
27#define CRC32C_SWAP(crc32c_value) \
28 (((crc32c_value & 0xff000000) >> 24) | \
29 ((crc32c_value & 0x00ff0000) >> 8) | \
30 ((crc32c_value & 0x0000ff00) << 8) | \
31 ((crc32c_value & 0x000000ff) << 24))
55WS_DLL_PUBLIC uint32_t
crc32c_calculate(
const void *buf,
int len, uint32_t crc);
71WS_DLL_PUBLIC uint32_t
crc32_ccitt(
const uint8_t *buf,
unsigned len);
82WS_DLL_PUBLIC uint32_t
crc32_ccitt_seed(
const uint8_t *buf,
unsigned len, uint32_t seed);
90WS_DLL_PUBLIC uint32_t
crc32_mpeg2_seed(
const uint8_t *buf,
unsigned len, uint32_t seed);
110WS_DLL_PUBLIC uint32_t
crc32_0x5D6DCB_seed(
const uint8_t *buf,
unsigned len, uint32_t seed);
129 const unsigned char *seed,
130 const size_t seed_len,
131 unsigned char *cypher_text,
132 const size_t data_len);
WS_DLL_PUBLIC uint32_t crc32_0x0AA725CF_seed(const uint8_t *buf, unsigned len, uint32_t seed)
Computes CRC32 checksum for the given data with the polynom 0x0AA725CF using precompiled CRC table.
Definition crc32.c:427
WS_DLL_PUBLIC uint32_t crc32_ccitt(const uint8_t *buf, unsigned len)
Compute CRC32 CCITT checksum of a buffer of data.
Definition crc32.c:391
WS_DLL_PUBLIC uint32_t crc32c_table_lookup(unsigned char pos)
Definition crc32.c:357
WS_DLL_PUBLIC uint32_t crc32c_calculate_no_swap(const void *buf, int len, uint32_t crc)
Compute CRC32C checksum of a buffer of data without swapping seed crc or completed checksum.
Definition crc32.c:380
WS_DLL_PUBLIC uint32_t crc32c_calculate(const void *buf, int len, uint32_t crc)
Compute CRC32C checksum of a buffer of data.
Definition crc32.c:369
WS_DLL_PUBLIC uint32_t crc32_ccitt_table_lookup(unsigned char pos)
Lookup a CRC-32/CCITT table value by position.
Definition crc32.c:363
WS_DLL_PUBLIC int Dot11DecryptWepDecrypt(const unsigned char *seed, const size_t seed_len, unsigned char *cypher_text, const size_t data_len)
Decrypt WEP-encrypted 802.11 payload using RC4 stream cipher.
Definition dot11decrypt_wep.c:23
WS_DLL_PUBLIC uint32_t crc32_ccitt_seed(const uint8_t *buf, unsigned len, uint32_t seed)
Compute CRC32 CCITT checksum of a buffer of data.
Definition crc32.c:397
WS_DLL_PUBLIC uint32_t crc32_0x5D6DCB_seed(const uint8_t *buf, unsigned len, uint32_t seed)
Computes CRC32 checksum for the given data with the polynom 0x5D6DCB using precompiled CRC table.
Definition crc32.c:439
WS_DLL_PUBLIC uint32_t crc32_mpeg2_seed(const uint8_t *buf, unsigned len, uint32_t seed)
Compute MPEG-2 CRC32 checksum of a buffer of data.
Definition crc32.c:413