Patrick Welche <prlw1@cam.ac.uk>
[netbsd-mini2440.git] / external / bsd / openldap / dist / include / lutil_hash.h
blobf881a1cae1fe686f8d9c0af2fdba7f98dc79b710
1 /* $OpenLDAP: pkg/ldap/include/lutil_hash.h,v 1.8.2.3 2008/02/11 23:26:40 kurt Exp $ */
2 /* This work is part of OpenLDAP Software <http://www.openldap.org/>.
4 * Copyright 1998-2008 The OpenLDAP Foundation.
5 * All rights reserved.
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted only as authorized by the OpenLDAP
9 * Public License.
11 * A copy of this license is available in file LICENSE in the
12 * top-level directory of the distribution or, alternatively, at
13 * <http://www.OpenLDAP.org/license.html>.
16 #ifndef _LUTIL_HASH_H_
17 #define _LUTIL_HASH_H_
19 #include <lber_types.h>
21 LDAP_BEGIN_DECL
23 #define LUTIL_HASH_BYTES 4
25 struct lutil_HASHContext {
26 ber_uint_t hash;
29 LDAP_LUTIL_F( void )
30 lutil_HASHInit LDAP_P((
31 struct lutil_HASHContext *context));
33 LDAP_LUTIL_F( void )
34 lutil_HASHUpdate LDAP_P((
35 struct lutil_HASHContext *context,
36 unsigned char const *buf,
37 ber_len_t len));
39 LDAP_LUTIL_F( void )
40 lutil_HASHFinal LDAP_P((
41 unsigned char digest[LUTIL_HASH_BYTES],
42 struct lutil_HASHContext *context));
44 typedef struct lutil_HASHContext lutil_HASH_CTX;
46 LDAP_END_DECL
48 #endif /* _LUTIL_HASH_H_ */