]> git.mxchange.org Git - simgear.git/blob - simgear/package/md5.h
Tweak HTTP code to always sleep.
[simgear.git] / simgear / package / md5.h
1 #ifndef SG_PACKAGE_MD5_H
2 #define SG_PACKAGE_MD5_H
3
4 /*
5  **********************************************************************
6  ** md5.h -- Header file for implementation of MD5                   **
7  ** RSA Data Security, Inc. MD5 Message Digest Algorithm             **
8  ** Created: 2/17/90 RLR                                             **
9  ** Revised: 12/27/90 SRD,AJ,BSK,JT Reference C version              **
10  ** Revised (for MD5): RLR 4/27/91                                   **
11  **   -- G modified to have y&~z instead of y&z                      **
12  **   -- FF, GG, HH modified to add in last register done            **
13  **   -- Access pattern: round 2 works mod 5, round 3 works mod 3    **
14  **   -- distinct additive constant for each step                    **
15  **   -- round 4 added, working mod 7                                **
16  **********************************************************************
17  */
18
19 /*
20  **********************************************************************
21  ** Copyright (C) 1990, RSA Data Security, Inc. All rights reserved. **
22  **                                                                  **
23  ** License to copy and use this software is granted provided that   **
24  ** it is identified as the "RSA Data Security, Inc. MD5 Message     **
25  ** Digest Algorithm" in all material mentioning or referencing this **
26  ** software or this function.                                       **
27  **                                                                  **
28  ** License is also granted to make and use derivative works         **
29  ** provided that such works are identified as "derived from the RSA **
30  ** Data Security, Inc. MD5 Message Digest Algorithm" in all         **
31  ** material mentioning or referencing the derived work.             **
32  **                                                                  **
33  ** RSA Data Security, Inc. makes no representations concerning      **
34  ** either the merchantability of this software or the suitability   **
35  ** of this software for any particular purpose.  It is provided "as **
36  ** is" without express or implied warranty of any kind.             **
37  **                                                                  **
38  ** These notices must be retained in any copies of any part of this **
39  ** documentation and/or software.                                   **
40  **********************************************************************
41  */
42
43 #ifdef __cplusplus
44  extern "C" {
45 #endif
46      
47 /* typedef a 32 bit type */
48 typedef unsigned int UINT4;
49
50 /* Data structure for MD5 (Message Digest) computation */
51 typedef struct {
52   UINT4 i[2];                   /* number of _bits_ handled mod 2^64 */
53   UINT4 buf[4];                                    /* scratch buffer */
54   unsigned char in[64];                              /* input buffer */
55   unsigned char digest[16];     /* actual digest after MD5Final call */
56 } SG_MD5_CTX;
57
58 void SG_MD5Init (SG_MD5_CTX *mdContext);
59 void SG_MD5Update (SG_MD5_CTX *mdContext, unsigned char *inBuf, unsigned int inLen);
60 void SG_MD5Final (SG_MD5_CTX *mdContext);
61
62 #ifdef __cplusplus
63 } // of extern C
64 #endif
65      
66 #endif // of SG_PACKAGE_MD5_H
67
68