3 * Copyright 1998-2001 The OpenLDAP Foundation, Redwood City, California, USA
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.
13 /* See md5.c for explanation and copyright information. */
18 #include <lber_types.h>
22 /* Unlike previous versions of this code, ber_int_t 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. */
28 #define LUTIL_MD5_BYTES 16
30 struct lutil_MD5Context {
37 lutil_MD5Init LDAP_P((
38 struct lutil_MD5Context *context));
41 lutil_MD5Update LDAP_P((
42 struct lutil_MD5Context *context,
43 unsigned char const *buf,
47 lutil_MD5Final LDAP_P((
48 unsigned char digest[16],
49 struct lutil_MD5Context *context));
52 lutil_MD5Transform LDAP_P((
54 const unsigned char in[64]));
57 * This is needed to make RSAREF happy on some MS-DOS compilers.
59 typedef struct lutil_MD5Context lutil_MD5_CTX;
63 #endif /* _LUTIL_MD5_H_ */