Sync usage with man page.
[netbsd-mini2440.git] / external / bsd / openldap / dist / include / lutil_md5.h
blobff331a92efa40374bc4066659bd666e42d1770e8
1 /* $OpenLDAP: pkg/ldap/include/lutil_md5.h,v 1.24.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.
5 * All rights reserved.
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted only as authorized by the OpenLDAP
9 * Public License.
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_MD5_H_
17 #define _LUTIL_MD5_H_
19 #include <lber_types.h>
21 LDAP_BEGIN_DECL
23 /* Unlike previous versions of this code, ber_int_t need not be exactly
24 32 bits, merely 32 bits or more. Choosing a data type which is 32
25 bits instead of 64 is not important; speed is considerably more
26 important. ANSI guarantees that "unsigned long" will be big enough,
27 and always using it seems to have few disadvantages. */
29 #define LUTIL_MD5_BYTES 16
31 struct lutil_MD5Context {
32 ber_uint_t buf[4];
33 ber_uint_t bits[2];
34 unsigned char in[64];
37 LDAP_LUTIL_F( void )
38 lutil_MD5Init LDAP_P((
39 struct lutil_MD5Context *context));
41 LDAP_LUTIL_F( void )
42 lutil_MD5Update LDAP_P((
43 struct lutil_MD5Context *context,
44 unsigned char const *buf,
45 ber_len_t len));
47 LDAP_LUTIL_F( void )
48 lutil_MD5Final LDAP_P((
49 unsigned char digest[16],
50 struct lutil_MD5Context *context));
52 LDAP_LUTIL_F( void )
53 lutil_MD5Transform LDAP_P((
54 ber_uint_t buf[4],
55 const unsigned char in[64]));
58 * This is needed to make RSAREF happy on some MS-DOS compilers.
60 typedef struct lutil_MD5Context lutil_MD5_CTX;
62 LDAP_END_DECL
64 #endif /* _LUTIL_MD5_H_ */