summaryrefslogtreecommitdiffstats
path: root/src/util/hash_fnv.h
blob: 0bf1771c800c9f3d8e0f36a28abdb4730f4038b7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#ifndef _HASH_FNV_H_INCLUDED_
#define _HASH_FNV_H_INCLUDED_

/*++
/* NAME
/*	hash_fnv 3h
/* SUMMARY
/*	Fowler/Noll/Vo hash function
/* SYNOPSIS
/*	#include <hash_fnv.h>
/* DESCRIPTION
/* .nf

 /*
  * External interface.
  */
#ifndef HASH_FNV_T
#include <stdint.h>
#ifdef USE_FNV_32BIT
#define HASH_FNV_T	uint32_t
#else					/* USE_FNV_32BIT */
#define HASH_FNV_T	uint64_t
#endif					/* USE_FNV_32BIT */
#endif					/* HASH_FNV_T */

extern HASH_FNV_T hash_fnv(const void *, size_t);
extern HASH_FNV_T hash_fnvz(const char *);

/* LICENSE
/* .ad
/* .fi
/*	The Secure Mailer license must be distributed with this software.
/* AUTHOR(S)
/*	Wietse Venema
/*	Google, Inc.
/*	111 8th Avenue
/*	New York, NY 10011, USA
/*--*/

#endif