libhasha 2.2.2
|
Header file for CRC32 checksum calculation. More...
#include "internal/internal.h"
Go to the source code of this file.
Macros | |
#define | CRC32_POLYNOMIAL 0xEDB88320 |
Functions | |
HA_EXTERN_C_BEG HA_PUBFUN uint32_t | ha_crc32_hash (ha_inbuf_t data, size_t len) |
Computes the CRC32 checksum in a single operation. |
Header file for CRC32 checksum calculation.
This file provides the definitions and function declaration for computing the CRC32 checksum, a cyclic redundancy check used to detect errors in data. It includes the definition of the CRC32 polynomial and a convenient one-shot function that performs initialization, update, and finalization of the CRC32 calculation in a single call.
Definition in file crc.h.
HA_EXTERN_C_BEG HA_PUBFUN uint32_t ha_crc32_hash | ( | ha_inbuf_t | data, |
size_t | len ) |
Computes the CRC32 checksum in a single operation.
This function calculates the CRC32 checksum of the given data using the CRC32 algorithm, starting from an initial value of 0xFFFFFFFF and finalizing with a bitwise complement. It is a convenient function that combines the initialization, update, and finalization steps into a single operation.
data | Pointer to the data buffer for which the CRC32 checksum will be computed. |
len | The length of the data in bytes. |