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.
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted only as authorized by the OpenLDAP
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>
23 #define LUTIL_HASH_BYTES 4
25 struct lutil_HASHContext
{
30 lutil_HASHInit
LDAP_P((
31 struct lutil_HASHContext
*context
));
34 lutil_HASHUpdate
LDAP_P((
35 struct lutil_HASHContext
*context
,
36 unsigned char const *buf
,
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
;
48 #endif /* _LUTIL_HASH_H_ */