]> git.sur5r.net Git - openldap/blob - include/lutil_hash.h
Fix entry encode/decode logging
[openldap] / include / lutil_hash.h
1 /* $OpenLDAP$ */
2 /*
3  * Copyright 1998-2000 The OpenLDAP Foundation, Redwood City, California, USA
4  * All rights reserved.
5  *
6  * Redistribution and use in source and binary forms are permitted only
7  * as authorized by the OpenLDAP Public License.  A copy of this
8  * license is available at http://www.OpenLDAP.org/license.html or
9  * in file LICENSE in the top-level directory of the distribution.
10  */
11
12 /* See hash.c for explanation and copyright information.  */
13
14 #ifndef _LUTIL_HASH_H_
15 #define _LUTIL_HASH_H_
16
17 #include <lber_types.h>
18
19 LDAP_BEGIN_DECL
20
21 #define LUTIL_HASH_BYTES 4
22
23 struct lutil_HASHContext {
24         ber_uint_t hash;
25 };
26
27 LDAP_LUTIL_F( void )
28 lutil_HASHInit LDAP_P((
29         struct lutil_HASHContext *context));
30
31 LDAP_LUTIL_F( void )
32 lutil_HASHUpdate LDAP_P((
33         struct lutil_HASHContext *context,
34         unsigned char const *buf,
35         ber_len_t len));
36
37 LDAP_LUTIL_F( void )
38 lutil_HASHFinal LDAP_P((
39         unsigned char digest[LUTIL_HASH_BYTES],
40         struct lutil_HASHContext *context));
41
42 typedef struct lutil_HASHContext lutil_HASH_CTX;
43
44 LDAP_END_DECL
45
46 #endif /* _LUTIL_HASH_H_ */