SHA1.h
1 
18 /*
19  * sha1.h
20  *
21  * Copyright (C) 1998, 2009
22  * Paul E. Jones <paulej@packetizer.com>
23  * All Rights Reserved
24  *
25  *****************************************************************************
26  * $Id: sha1.h 12 2009-06-22 19:34:25Z paulej $
27  *****************************************************************************
28  *
29  * Description:
30  * This class implements the Secure Hashing Standard as defined
31  * in FIPS PUB 180-1 published April 17, 1995.
32  *
33  * Many of the variable names in the SHA1Context, especially the
34  * single character names, were used because those were the names
35  * used in the publication.
36  *
37  * Please read the file sha1.c for more information.
38  *
39  */
40 
41 #ifndef _SHA1_H_
42 #define _SHA1_H_
43 
44 #if defined(_WIN32) && !defined(USCXML_STATIC)
45 # ifdef USCXML_EXPORT
46 # define USCXML_API __declspec(dllexport)
47 # else
48 # define USCXML_API __declspec(dllimport)
49 # endif
50 #else
51 # define USCXML_API
52 #endif
53 
54 #ifdef __cplusplus
55 extern "C" {
56 #endif
57 
58 /*
59  * This structure will hold context information for the hashing
60  * operation
61  */
62 typedef struct SHA1Context {
63  unsigned Message_Digest[5]; /* Message Digest (output) */
64 
65  unsigned Length_Low; /* Message length in bits */
66  unsigned Length_High; /* Message length in bits */
67 
68  unsigned char Message_Block[64]; /* 512-bit message blocks */
69  int Message_Block_Index; /* Index into message block array */
70 
71  int Computed; /* Is the digest computed? */
72  int Corrupted; /* Is the message digest corruped? */
73 } SHA1Context;
74 
75 /*
76  * Function Prototypes
77  */
78 USCXML_API void SHA1Reset(SHA1Context *);
79 USCXML_API int SHA1Result(SHA1Context *);
80 USCXML_API void SHA1Input(SHA1Context *,
81  const unsigned char *,
82  unsigned);
83 
84 #ifdef __cplusplus
85 }
86 #endif
87 
88 #endif
Definition: SHA1.h:62