]> git.sur5r.net Git - openldap/blob - include/lutil_md5.h
Remove incorrect use of <matched> entry
[openldap] / include / lutil_md5.h
1 /* $OpenLDAP$ */
2 /*
3  * Copyright 1998,1999 The OpenLDAP Foundation, Redwood City, California, USA
4  * All rights reserved.
5  *
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.
10  */
11
12 /* See md5.c for explanation and copyright information.  */
13
14 #ifndef _LUTIL_MD5_H_
15 #define _LUTIL_MD5_H_
16
17 #include <ldap_cdefs.h>
18 #include <ac/bytes.h>
19
20 LDAP_BEGIN_DECL
21
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.  */
27
28 #ifndef LDAP_UINT32
29 #define LDAP_UINT32 1
30 typedef ac_uint4 uint32;
31 #endif
32
33 struct lutil_MD5Context {
34         uint32 buf[4];
35         uint32 bits[2];
36         unsigned char in[64];
37 };
38
39 LDAP_F( void )
40 lutil_MD5Init LDAP_P((
41         struct lutil_MD5Context *context));
42
43 LDAP_F( void )
44 lutil_MD5Update LDAP_P((
45         struct lutil_MD5Context *context,
46         unsigned char const *buf,
47         unsigned len));
48
49 LDAP_F( void )
50 lutil_MD5Final LDAP_P((
51         unsigned char digest[16],
52         struct lutil_MD5Context *context));
53
54 LDAP_F( void )
55 lutil_MD5Transform LDAP_P((
56         uint32 buf[4],
57         const unsigned char in[64]));
58
59 /*
60  * This is needed to make RSAREF happy on some MS-DOS compilers.
61  */
62 typedef struct lutil_MD5Context lutil_MD5_CTX;
63
64 LDAP_END_DECL
65
66 #endif /* _LUTIL_MD5_H_ */