]>
jfr.im git - irc/quakenet/newserv.git/blob - lib/sha1.h
1 /* $OpenBSD: sha1.h,v 1.16 2004/01/22 21:48:02 espie Exp $ */
5 * By Steve Reid <steve@edmweb.com>
12 #include <sys/types.h>
17 unsigned char buffer
[64];
20 #include <sys/cdefs.h>
23 void SHA1Transform(u_int32_t
[5], const unsigned char [64]);
24 void SHA1Init(SHA1_CTX
*);
25 void SHA1Update(SHA1_CTX
*, const unsigned char *, unsigned int);
26 void SHA1Final(unsigned char [20], SHA1_CTX
*);
27 char *SHA1End(SHA1_CTX
*, char *);
28 char *SHA1File(char *, char *);
29 char *SHA1Data(const unsigned char *, size_t, char *);
32 #define SHA1_DIGESTSIZE 20
33 #define SHA1_BLOCKSIZE 64
34 #define HTONDIGEST(x) do { \
39 x[4] = htonl(x[4]); } while (0)
41 #define NTOHDIGEST(x) do { \
46 x[4] = ntohl(x[4]); } while (0)