1 /* $NetBSD: sha1.h,v 1.2 1998/05/29 22:55:44 thorpej Exp $ */ 2 3 /* 4 * SHA-1 in C 5 * By Steve Reid <steve@edmweb.com> 6 * 100% Public Domain 7 */ 8 9 #ifndef _SYS_SHA1_H_ 10 #define _SYS_SHA1_H_ 11 12 #include <sys/types.h> 13 14 typedef struct { 15 u_int32_t state[5]; 16 u_int32_t count[2]; 17 u_char buffer[64]; 18 } SHA1_CTX; 19 20 void SHA1Transform __P((u_int32_t state[5], const u_char buffer[64])); 21 void SHA1Init __P((SHA1_CTX *context)); 22 void SHA1Update __P((SHA1_CTX *context, const u_char *data, u_int len)); 23 void SHA1Final __P((u_char digest[20], SHA1_CTX *context)); 24 #ifndef _KERNEL 25 char *SHA1End __P((SHA1_CTX *, char *)); 26 char *SHA1File __P((char *, char *)); 27 char *SHA1Data __P((const u_char *, size_t, char *)); 28 #endif /* _KERNEL */ 29 30 #endif /* _SYS_SHA1_H_ */ 31