Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Also include the str.h header from main xbt.h
[simgrid.git] / include / xbt / hash.h
1 /* $Id: str.h,v 1.5 2007/05/02 10:08:55 mquinson Exp $ */
2
3 /* hash.h - Various hashing functions.                                      */
4
5 /* Copyright (c) 2007, Martin Quinson.                                      */
6 /* All rights reserved.                                                     */
7
8 /* This program is free software; you can redistribute it and/or modify it
9  * under the terms of the license (GNU LGPL) which comes with this package. */
10
11 #ifndef XBT_HASH_H
12 #define XBT_HASH_H
13 #include "xbt/str.h"
14
15 /* Chord needs a SHA1 algorithm. Let's drop it in there */
16 typedef struct s_xbt_sha_ s_xbt_sha_t, *xbt_sha_t;
17
18 XBT_PUBLIC(xbt_sha_t) xbt_sha_new (void);
19 XBT_PUBLIC(void)      xbt_sha_free (xbt_sha_t sha);
20
21 XBT_PUBLIC(void)      xbt_sha_feed (xbt_sha_t sha, const unsigned char *data, size_t len);
22 XBT_PUBLIC(void)      xbt_sha_reset (xbt_sha_t sha);
23
24 XBT_PUBLIC(void)      xbt_sha_print (xbt_sha_t sha, char *hash);
25 XBT_PUBLIC(char *)    xbt_sha_read(xbt_sha_t sha);
26    
27 XBT_PUBLIC(void)      xbt_sha (const char *data, char *hash);
28
29
30 #endif /* XBT_HASH_H */