|
API Reference Manual
1.48.0
|
Hash functions.
Data Structures | |
| struct | odp_hash_crc_param_t |
| CRC parameters. More... | |
Typedefs | |
| typedef struct odp_hash_crc_param_t | odp_hash_crc_param_t |
| CRC parameters. More... | |
Functions | |
| uint32_t | odp_hash_crc32 (const void *data, uint32_t data_len, uint32_t init_val) |
| Calculate CRC-32. More... | |
| uint32_t | odp_hash_crc32c (const void *data, uint32_t data_len, uint32_t init_val) |
| Calculate CRC-32C. More... | |
| int | odp_hash_crc_gen64 (const void *data, uint32_t data_len, uint64_t init_val, odp_hash_crc_param_t *crc_param, uint64_t *crc) |
| Calculate up to 64 bit CRC using the given parameters. More... | |
| typedef struct odp_hash_crc_param_t odp_hash_crc_param_t |
CRC parameters.
Supports CRCs up to 64 bits
| uint32_t odp_hash_crc32 | ( | const void * | data, |
| uint32_t | data_len, | ||
| uint32_t | init_val | ||
| ) |
Calculate CRC-32.
Calculates CRC-32 over the data. The polynomial is 0x04c11db7.
| data | Pointer to data |
| data_len | Data length in bytes |
| init_val | CRC generator initialization value |
| uint32_t odp_hash_crc32c | ( | const void * | data, |
| uint32_t | data_len, | ||
| uint32_t | init_val | ||
| ) |
Calculate CRC-32C.
Calculates CRC-32C (a.k.a. CRC-32 Castagnoli) over the data. The polynomial is 0x1edc6f41.
| data | Pointer to data |
| data_len | Data length in bytes |
| init_val | CRC generator initialization value |
| int odp_hash_crc_gen64 | ( | const void * | data, |
| uint32_t | data_len, | ||
| uint64_t | init_val, | ||
| odp_hash_crc_param_t * | crc_param, | ||
| uint64_t * | crc | ||
| ) |
Calculate up to 64 bit CRC using the given parameters.
Calculates CRC over the data using the given parameters.
| data | Pointer to data |
| data_len | Data length in bytes |
| init_val | CRC generator initialization value |
| crc_param | CRC parameters |
| crc | Pointer for CRC output |