implementation of CRC16 and CRC32 More...
Go to the source code of this file.
Macros | |
#define | LOG(kind, ...) GNUNET_log_from (kind, "util-crypto-crc", __VA_ARGS__) |
#define | Z_NULL 0 |
#define | POLYNOMIAL (GNUNET_uLong) 0xedb88320 |
Functions | |
static void | crc_init () |
static GNUNET_uLong | gn_crc32 (GNUNET_uLong crc, const char *buf, size_t len) |
int32_t | GNUNET_CRYPTO_crc32_n (const void *buf, size_t len) |
Compute the CRC32 checksum for the first len bytes of the buffer. More... | |
uint32_t | GNUNET_CRYPTO_crc16_step (uint32_t sum, const void *buf, size_t len) |
Perform an incremental step in a CRC16 (for TCP/IP) calculation. More... | |
uint16_t | GNUNET_CRYPTO_crc16_finish (uint32_t sum) |
Convert results from GNUNET_CRYPTO_crc16_step to final crc16. More... | |
uint16_t | GNUNET_CRYPTO_crc16_n (const void *buf, size_t len) |
Calculate the checksum of a buffer in one step. More... | |
uint8_t | GNUNET_CRYPTO_crc8_n (const void *buf, size_t len) |
Calculate the checksum of a buffer in one step. More... | |
Variables | |
static GNUNET_uLong | crc_table [256] |
implementation of CRC16 and CRC32
Definition in file crypto_crc.c.
#define LOG | ( | kind, | |
... | |||
) | GNUNET_log_from (kind, "util-crypto-crc", __VA_ARGS__) |
Definition at line 34 of file crypto_crc.c.
#define Z_NULL 0 |
Definition at line 45 of file crypto_crc.c.
#define POLYNOMIAL (GNUNET_uLong) 0xedb88320 |
Definition at line 48 of file crypto_crc.c.
|
static |
Definition at line 57 of file crypto_crc.c.
References crc_table, h, once, and POLYNOMIAL.
Referenced by gn_crc32().
|
static |
Definition at line 87 of file crypto_crc.c.
References crc_init(), crc_table, and GNUNET_assert.
Referenced by GNUNET_CRYPTO_crc32_n().
|
static |
Definition at line 49 of file crypto_crc.c.
Referenced by crc_init(), and gn_crc32().