3 * Copyright 1998-2001 The OpenLDAP Foundation, Redwood City, California, USA
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted only as authorized by the OpenLDAP
8 * Public License. A copy of this license is available at
9 * http://www.OpenLDAP.org/license.html or in file LICENSE in the
10 * top-level directory of the distribution.
13 /* This version is based on:
14 * $OpenBSD: sha1.h,v 1.8 1997/07/15 01:54:23 millert Exp $ */
16 #ifndef _LUTIL_SHA1_H_
17 #define _LUTIL_SHA1_H_
19 #include <ldap_cdefs.h>
26 * By Steve Reid <steve@edmweb.com>
28 #define LUTIL_SHA1_BYTES 20
30 /* This code assumes char are 8-bits and uint32 are 32-bits */
31 typedef ac_uint4 uint32;
36 unsigned char buffer[64];
41 LDAP_P((uint32 state[5], const unsigned char buffer[64]));
45 LDAP_P((lutil_SHA1_CTX *context));
49 LDAP_P((lutil_SHA1_CTX *context, const unsigned char *data, uint32 len));
53 LDAP_P((unsigned char digest[20], lutil_SHA1_CTX *context));
55 LDAP_LUTIL_F( char * )
57 LDAP_P((lutil_SHA1_CTX *, char *));
59 LDAP_LUTIL_F( char * )
61 LDAP_P((char *, char *));
63 LDAP_LUTIL_F( char * )
65 LDAP_P((const unsigned char *, size_t, char *));
69 #endif /* _LUTIL_SHA1_H_ */