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