]> git.sur5r.net Git - openldap/blob - include/lutil_md5.h
Add sizeof checks to configure.in.
[openldap] / include / lutil_md5.h
1 /* See md5.c for explanation and copyright information.  */
2
3 #ifndef _LDAP_MD5_H_
4 #define _LDAP_MD5_H_
5
6 #include <ldap_cdefs.h>
7 #include <ac/bytes.h>
8
9 LDAP_BEGIN_DECL
10
11 /* Unlike previous versions of this code, uint32 need not be exactly
12    32 bits, merely 32 bits or more.  Choosing a data type which is 32
13    bits instead of 64 is not important; speed is considerably more
14    important.  ANSI guarantees that "unsigned long" will be big enough,
15    and always using it seems to have few disadvantages.  */
16
17 typedef LDAP_UINT4 uint32;
18
19 struct ldap_MD5Context {
20         uint32 buf[4];
21         uint32 bits[2];
22         unsigned char in[64];
23 };
24
25 LDAP_F void ldap_MD5Init LDAP_P((
26         struct ldap_MD5Context *context));
27
28 LDAP_F void ldap_MD5Update LDAP_P((
29         struct ldap_MD5Context *context,
30         unsigned char const *buf,
31         unsigned len));
32
33 LDAP_F void ldap_MD5Final LDAP_P((
34         unsigned char digest[16],
35         struct ldap_MD5Context *context));
36
37 LDAP_F void ldap_MD5Transform LDAP_P((
38         uint32 buf[4],
39         const unsigned char in[64]));
40
41 /*
42  * This is needed to make RSAREF happy on some MS-DOS compilers.
43  */
44 typedef struct ldap_MD5Context ldap_MD5_CTX;
45
46 LDAP_END_DECL
47
48 #endif /* _LDAP_MD5_H_ */