1 /* $NetBSD: hash_fnv.h,v 1.3 2023/12/23 20:30:46 christos Exp $ */ 2 3 #ifndef _HASH_FNV_H_INCLUDED_ 4 #define _HASH_FNV_H_INCLUDED_ 5 6 /*++ 7 /* NAME 8 /* hash_fnv 3h 9 /* SUMMARY 10 /* Fowler/Noll/Vo hash function 11 /* SYNOPSIS 12 /* #include <hash_fnv.h> 13 /* DESCRIPTION 14 /* .nf 15 16 /* 17 * External interface. 18 */ 19 #ifndef HASH_FNV_T 20 #include <stdint.h> 21 #ifdef USE_FNV_32BIT 22 #define HASH_FNV_T uint32_t 23 #else /* USE_FNV_32BIT */ 24 #define HASH_FNV_T uint64_t 25 #endif /* USE_FNV_32BIT */ 26 #endif /* HASH_FNV_T */ 27 28 extern HASH_FNV_T hash_fnv(const void *, size_t); 29 extern HASH_FNV_T hash_fnvz(const char *); 30 31 /* LICENSE 32 /* .ad 33 /* .fi 34 /* The Secure Mailer license must be distributed with this software. 35 /* AUTHOR(S) 36 /* Wietse Venema 37 /* Google, Inc. 38 /* 111 8th Avenue 39 /* New York, NY 10011, USA 40 /*--*/ 41 42 #endif 43