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