API Reference Manual 1.51.0
Loading...
Searching...
No Matches
api/spec/hash.h
Go to the documentation of this file.
1/* SPDX-License-Identifier: BSD-3-Clause
2 * Copyright (c) 2015-2018 Linaro Limited
3 */
4
11#ifndef ODP_API_SPEC_HASH_H_
12#define ODP_API_SPEC_HASH_H_
13#include <odp/visibility_begin.h>
14
15#include <odp/api/std_types.h>
16
17#ifdef __cplusplus
18extern "C" {
19#endif
20
37uint32_t odp_hash_crc32(const void *data, uint32_t data_len, uint32_t init_val);
38
51uint32_t odp_hash_crc32c(const void *data, uint32_t data_len,
52 uint32_t init_val);
53
71
85int odp_hash_crc_gen64(const void *data, uint32_t data_len,
86 uint64_t init_val, odp_hash_crc_param_t *crc_param,
87 uint64_t *crc);
88
93#ifdef __cplusplus
94}
95#endif
96
97#include <odp/visibility_end.h>
98#endif
Standard C language types and definitions for ODP.
uint32_t odp_hash_crc32(const void *data, uint32_t data_len, uint32_t init_val)
Calculate CRC-32.
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.
uint32_t odp_hash_crc32c(const void *data, uint32_t data_len, uint32_t init_val)
Calculate CRC-32C.
bool odp_bool_t
Boolean type.
CRC parameters.
uint64_t xor_out
XOR this value to CRC output (stored in 'width' LSB bits)
odp_bool_t reflect_out
0: don't reflect, 1: reflect bits in output bytes
uint32_t width
CRC width in bits.
uint64_t poly
Polynomial (stored in 'width' LSB bits)
odp_bool_t reflect_in
0: don't reflect, 1: reflect bits in input bytes