Commit | Line | Data |
---|---|---|
1de93811 ML |
1 | /*\r |
2 | * sha1.h\r | |
3 | *\r | |
4 | * Copyright (C) 1998\r | |
5 | * Paul E. Jones <paulej@arid.us>\r | |
6 | * All Rights Reserved\r | |
7 | *\r | |
8 | * This software is licensed as "freeware." Permission to distribute\r | |
9 | * this software in source and binary forms is hereby granted without\r | |
10 | * a fee. THIS SOFTWARE IS PROVIDED 'AS IS' AND WITHOUT ANY EXPRESSED\r | |
11 | * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\r | |
12 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.\r | |
13 | * THE AUTHOR SHALL NOT BE HELD LIABLE FOR ANY DAMAGES RESULTING\r | |
14 | * FROM THE USE OF THIS SOFTWARE, EITHER DIRECTLY OR INDIRECTLY, INCLUDING,\r | |
15 | * BUT NOT LIMITED TO, LOSS OF DATA OR DATA BEING RENDERED INACCURATE.\r | |
16 | *\r | |
17 | * This software is licensed as "freeware." Permission to distribute\r | |
18 | * this software in source and binary forms is hereby granted without\r | |
19 | * a fee. THIS SOFTWARE IS PROVIDED 'AS IS' AND WITHOUT ANY EXPRESSED\r | |
20 | * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\r | |
21 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.\r | |
22 | * THE AUTHOR SHALL NOT BE HELD LIABLE FOR ANY DAMAGES RESULTING\r | |
23 | * FROM THE USE OF THIS SOFTWARE, EITHER DIRECTLY OR INDIRECTLY, INCLUDING,\r | |
24 | * BUT NOT LIMITED TO, LOSS OF DATA OR DATA BEING RENDERED INACCURATE.\r | |
25 | *\r | |
26 | *****************************************************************************\r | |
27 | * $Id: sha1.h,v 1.2 2004/03/27 18:00:33 paulej Exp $\r | |
28 | *****************************************************************************\r | |
29 | *\r | |
30 | * Description:\r | |
31 | * This class implements the Secure Hashing Standard as defined\r | |
32 | * in FIPS PUB 180-1 published April 17, 1995.\r | |
33 | *\r | |
34 | * Many of the variable names in the SHA1Context, especially the\r | |
35 | * single character names, were used because those were the names\r | |
36 | * used in the publication.\r | |
37 | *\r | |
38 | * Please read the file sha1.c for more information.\r | |
39 | *\r | |
40 | */\r | |
41 | \r | |
42 | #ifndef _SHA1_H_\r | |
43 | #define _SHA1_H_\r | |
44 | \r | |
45 | /* \r | |
46 | * This structure will hold context information for the hashing\r | |
47 | * operation\r | |
48 | */\r | |
49 | typedef struct SHA1Context\r | |
50 | {\r | |
51 | unsigned Message_Digest[5]; /* Message Digest (output) */\r | |
52 | \r | |
53 | unsigned Length_Low; /* Message length in bits */\r | |
54 | unsigned Length_High; /* Message length in bits */\r | |
55 | \r | |
56 | unsigned char Message_Block[64]; /* 512-bit message blocks */\r | |
57 | int Message_Block_Index; /* Index into message block array */\r | |
58 | \r | |
59 | int Computed; /* Is the digest computed? */\r | |
60 | int Corrupted; /* Is the message digest corruped? */\r | |
61 | } SHA1Context;\r | |
62 | \r | |
63 | /*\r | |
64 | * Function Prototypes\r | |
65 | */\r | |
66 | void SHA1Reset(SHA1Context *);\r | |
67 | int SHA1Result(SHA1Context *);\r | |
68 | void SHA1Input( SHA1Context *,\r | |
69 | const unsigned char *,\r | |
70 | unsigned);\r | |
71 | \r | |
72 | #endif\r |