Debian Codegraph @

src/common/bnethash.h

raw symbols SCIP
1 /*
2 * Copyright (C) 1999 Descolada (dyn1-tnt9-237.chicago.il.ameritech.net)
3 * Copyright (C) 1999,2000 Ross Combs ([email protected])
4 *
5 * This program is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU General Public License
7 * as published by the Free Software Foundation; either version 2
8 * of the License, or (at your option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18 */
19 #ifndef INCLUDED_BNETHASH_TYPES
20 #define INCLUDED_BNETHASH_TYPES
21
22 #include <cstdint>
23
24 namespace pvpgn
25 {
26 using t_hash = std::uint32_t[5];
27 }
28
29 #endif
30
31 /*****/
32 #ifndef JUST_NEED_TYPES
33 #ifndef INCLUDED_BNETHASH_PROTOS
34 #define INCLUDED_BNETHASH_PROTOS
35
36 namespace pvpgn
37 {
38
39 extern int bnet_hash(t_hash * hashout, unsigned int size, void const * data);
40 extern int sha1_hash(t_hash * hashout, unsigned int size, void const * data);
41 extern int little_endian_sha1_hash(t_hash * hashout, unsigned int size, void const * data);
42 extern int hash_eq(t_hash const h1, t_hash const h2);
43 extern char const * hash_get_str(t_hash const hash);
44 extern char const * little_endian_hash_get_str(t_hash const hash);
45 extern int hash_set_str(t_hash * hash, char const * str);
46
47 }
48
49 #endif
50 #endif