3 * Copyright 1998,1999 The OpenLDAP Foundation, Redwood City, California, USA
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.
12 /* See md5.c for explanation and copyright information. */
17 #include <ldap_cdefs.h>
22 /* Unlike previous versions of this code, uint32 need not be exactly
23 32 bits, merely 32 bits or more. Choosing a data type which is 32
24 bits instead of 64 is not important; speed is considerably more
25 important. ANSI guarantees that "unsigned long" will be big enough,
26 and always using it seems to have few disadvantages. */
30 typedef ac_uint4 uint32;
33 struct lutil_MD5Context {
42 # define LDAP_F_PRE extern __declspec(LIBLUTIL_DECL)
44 # define LDAP_F_PRE extern
49 lutil_MD5Init LDAP_P((
50 struct lutil_MD5Context *context));
53 lutil_MD5Update LDAP_P((
54 struct lutil_MD5Context *context,
55 unsigned char const *buf,
59 lutil_MD5Final LDAP_P((
60 unsigned char digest[16],
61 struct lutil_MD5Context *context));
64 lutil_MD5Transform LDAP_P((
66 const unsigned char in[64]));
69 * This is needed to make RSAREF happy on some MS-DOS compilers.
71 typedef struct lutil_MD5Context lutil_MD5_CTX;
75 #endif /* _LUTIL_MD5_H_ */