File: sha1.h

package info (click to toggle)
tcllib 2.0%2Bdfsg-4
  • links: PTS
  • area: main
  • in suites: trixie
  • size: 83,572 kB
  • sloc: tcl: 306,798; ansic: 14,272; sh: 3,035; xml: 1,766; yacc: 1,157; pascal: 881; makefile: 124; perl: 84; f90: 84; python: 33; ruby: 13; php: 11
file content (28 lines) | stat: -rw-r--r-- 656 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
/*	$NetBSD: sha1.h,v 1.5 2006/10/02 23:42:08 patthoyts Exp $	*/

/*
 * SHA-1 in C
 * By Steve Reid <steve@edmweb.com>
 * 100% Public Domain
 */

#ifndef _SYS_SHA1_H_
#define	_SYS_SHA1_H_

#include "tclpre9compat.h"

typedef unsigned int  my_int32_t;
typedef unsigned char my_char;

typedef struct {
	my_int32_t state [5];
	my_int32_t count [2];  
	my_char    buffer[64];
} SHA1_CTX;
  
void	SHA1Transform (my_int32_t state[5], const my_char buffer[64]);
void	SHA1Init      (SHA1_CTX *context);
void	SHA1Update    (SHA1_CTX *context, const my_char *data, Tcl_Size len);
void	SHA1Final     (my_char digest[20], SHA1_CTX *context);

#endif /* _SYS_SHA1_H_ */