2 * Copyright 1998,1999 The OpenLDAP Foundation, Redwood City, California, USA
5 * Redistribution and use in source and binary forms are permitted only
6 * as authorized by the OpenLDAP Public License. A copy of this
7 * license is available at http://www.OpenLDAP.org/license.html or
8 * in file LICENSE in the top-level directory of the distribution.
11 /* This version is based on:
12 * $OpenBSD: sha1.h,v 1.8 1997/07/15 01:54:23 millert Exp $ */
14 #ifndef _LUTIL_SHA1_H_
15 #define _LUTIL_SHA1_H_
17 #include <ldap_cdefs.h>
24 * By Steve Reid <steve@edmweb.com>
30 typedef LDAP_UINT4 uint32;
36 unsigned char buffer[64];
39 LDAP_F void lutil_SHA1Transform
40 LDAP_P((uint32 state[5], const unsigned char buffer[64]));
42 LDAP_F void lutil_SHA1Init
43 LDAP_P((lutil_SHA1_CTX *context));
45 LDAP_F void lutil_SHA1Update
46 LDAP_P((lutil_SHA1_CTX *context, const unsigned char *data, u_int len));
48 LDAP_F void lutil_SHA1Final
49 LDAP_P((unsigned char digest[20], lutil_SHA1_CTX *context));
51 LDAP_F char *lutil_SHA1End
52 LDAP_P((lutil_SHA1_CTX *, char *));
54 LDAP_F char *lutil_SHA1File
55 LDAP_P((char *, char *));
57 LDAP_F char *lutil_SHA1Data
58 LDAP_P((const unsigned char *, size_t, char *));
62 #endif /* _LUTIL_SHA1_H_ */