1 /* SPDX-License-Identifier: BSD-2-Clause OR GPL-2.0+ */ 2 #ifndef __EROFS_XXHASH_H 3 #define __EROFS_XXHASH_H 4 5 #ifdef __cplusplus 6 extern "C" 7 { 8 #endif 9 10 #include <stdint.h> 11 12 /** 13 * xxh32() - calculate the 32-bit hash of the input with a given seed. 14 * 15 * @input: The data to hash. 16 * @length: The length of the data to hash. 17 * @seed: The seed can be used to alter the result predictably. 18 * 19 * Return: The 32-bit hash of the data. 20 */ 21 uint32_t xxh32(const void *input, size_t length, uint32_t seed); 22 23 #ifdef __cplusplus 24 } 25 #endif 26 27 #endif 28