2 Copyright (C) Slava Astashonok <sla@0n.ru>
4 This program is free software; you can redistribute it and/or
5 modify it under the terms of the GNU General Public License.
7 $Id: hash.h,v 1.1.1.1.2.3.2.1 2005/01/29 19:30:41 sla Exp $
14 # ifndef HASH_TYPE_CRC
15 # error HASH_TYPE_XOR or HASH_TYPE_CRC must be defined
19 # error HASH_TYPE_XOR or HASH_TYPE_CRC must be defined
25 # error illegal value in HASH_BITS
28 # error illegal value in HASH_BITS
32 #include <my_inttypes.h>
35 typedef uint8_t hash_t;
39 typedef uint16_t hash_t;
42 #define CRC16_POLY 0x8005
45 # define RNDDEV "/dev/random"
48 uint16_t crc16(uint16_t, uint8_t);
49 hash_t hash(void *, int);