client-c  0.8.1
sha1.h
Go to the documentation of this file.
1 /*
2  * sha1.h
3  *
4  * Copyright (C) 1998, 2009
5  * Paul E. Jones <paulej@packetizer.com>
6  * All Rights Reserved
7  *
8  *****************************************************************************
9  * $Id: sha1.h 12 2009-06-22 19:34:25Z paulej $
10  *****************************************************************************
11  *
12  * Description:
13  * This class implements the Secure Hashing Standard as defined
14  * in FIPS PUB 180-1 published April 17, 1995.
15  *
16  * Many of the variable names in the SHA1Context, especially the
17  * single character names, were used because those were the names
18  * used in the publication.
19  *
20  * Please read the file sha1.c for more information.
21  *
22  */
23 
24 #ifndef _SHA1_H_
25 #define _SHA1_H_
26 
27 /*
28  * This structure will hold context information for the hashing
29  * operation
30  */
31 typedef struct SHA1Context
32 {
33  unsigned Message_Digest[5]; /* Message Digest (output) */
34 
35  unsigned Length_Low; /* Message length in bits */
36  unsigned Length_High; /* Message length in bits */
37 
38  unsigned char Message_Block[64]; /* 512-bit message blocks */
39  int Message_Block_Index; /* Index into message block array */
40 
41  int Computed; /* Is the digest computed? */
42  int Corrupted; /* Is the message digest corruped? */
43 } SHA1Context;
44 
45 /*
46  * Function Prototypes
47  */
48 void SHA1Reset(SHA1Context *);
49 int SHA1Result(SHA1Context *);
50 void SHA1Input( SHA1Context *,
51  const unsigned char *,
52  unsigned);
53 
54 #endif
unsigned Message_Digest[5]
Definition: sha1.h:33
struct SHA1Context SHA1Context
void SHA1Reset(SHA1Context *)
unsigned Length_Low
Definition: sha1.h:35
int Computed
Definition: sha1.h:41
int SHA1Result(SHA1Context *)
int Corrupted
Definition: sha1.h:42
int Message_Block_Index
Definition: sha1.h:39
void SHA1Input(SHA1Context *, const unsigned char *, unsigned)
unsigned char Message_Block[64]
Definition: sha1.h:38
unsigned Length_High
Definition: sha1.h:36