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.
15 #include <ldap_cdefs.h>
16 #include <lber_types.h>
19 * Include file for LDAP utility routine
24 /* n octets encode into ceiling(n/3) * 4 bytes */
25 /* Avoid floating point math by through extra padding */
27 #define LUTIL_BASE64_ENCODE_LEN(n) ((n)/3 * 4 + 4)
28 #define LUTIL_BASE64_DECODE_LEN(n) ((n)/4 * 3)
30 /* ISC Base64 Routines */
34 lutil_b64_ntop LDAP_P((
35 unsigned char const *,
41 lutil_b64_pton LDAP_P((
54 lutil_entropy LDAP_P((
59 struct berval; /* avoid pulling in lber.h */
63 const struct berval *passwd, /* stored password */
64 const struct berval *cred, /* user supplied value */
65 const char **methods ));
67 LIBLUTIL_F( struct berval * )
68 lutil_passwd_generate LDAP_P(( ber_len_t ));
70 LIBLUTIL_F( struct berval * )
71 lutil_passwd_hash LDAP_P((
72 const struct berval *passwd,
73 const char *method ));
76 lutil_passwd_scheme LDAP_P((
77 const char *scheme ));
81 lutil_progname LDAP_P((
88 lutil_pair( LBER_SOCKET_T sd[2] );