]> git.sur5r.net Git - freertos/blob - FreeRTOS/Demo/lwIP_Demo_Rowley_ARM7/lwip-1.1.0/src/netif/ppp/md5.h
Add FreeRTOS-Plus directory.
[freertos] / FreeRTOS / Demo / lwIP_Demo_Rowley_ARM7 / lwip-1.1.0 / src / netif / ppp / md5.h
1 /*\r
2  ***********************************************************************\r
3  ** md5.h -- header file for implementation of MD5                    **\r
4  ** RSA Data Security, Inc. MD5 Message-Digest Algorithm              **\r
5  ** Created: 2/17/90 RLR                                              **\r
6  ** Revised: 12/27/90 SRD,AJ,BSK,JT Reference C version               **\r
7  ** Revised (for MD5): RLR 4/27/91                                    **\r
8  **   -- G modified to have y&~z instead of y&z                       **\r
9  **   -- FF, GG, HH modified to add in last register done             **\r
10  **   -- Access pattern: round 2 works mod 5, round 3 works mod 3     **\r
11  **   -- distinct additive constant for each step                     **\r
12  **   -- round 4 added, working mod 7                                 **\r
13  ***********************************************************************\r
14  */\r
15 \r
16 /*\r
17  ***********************************************************************\r
18  ** Copyright (C) 1990, RSA Data Security, Inc. All rights reserved.  **\r
19  **                                                                   **\r
20  ** License to copy and use this software is granted provided that    **\r
21  ** it is identified as the "RSA Data Security, Inc. MD5 Message-     **\r
22  ** Digest Algorithm" in all material mentioning or referencing this  **\r
23  ** software or this function.                                        **\r
24  **                                                                   **\r
25  ** License is also granted to make and use derivative works          **\r
26  ** provided that such works are identified as "derived from the RSA  **\r
27  ** Data Security, Inc. MD5 Message-Digest Algorithm" in all          **\r
28  ** material mentioning or referencing the derived work.              **\r
29  **                                                                   **\r
30  ** RSA Data Security, Inc. makes no representations concerning       **\r
31  ** either the merchantability of this software or the suitability    **\r
32  ** of this software for any particular purpose.  It is provided "as  **\r
33  ** is" without express or implied warranty of any kind.              **\r
34  **                                                                   **\r
35  ** These notices must be retained in any copies of any part of this  **\r
36  ** documentation and/or software.                                    **\r
37  ***********************************************************************\r
38  */\r
39 \r
40 #ifndef MD5_H\r
41 #define MD5_H\r
42 \r
43 /* Data structure for MD5 (Message-Digest) computation */\r
44 typedef struct {\r
45   u32_t i[2];                   /* number of _bits_ handled mod 2^64 */\r
46   u32_t buf[4];                                    /* scratch buffer */\r
47   unsigned char in[64];                              /* input buffer */\r
48   unsigned char digest[16];     /* actual digest after MD5Final call */\r
49 } MD5_CTX;\r
50 \r
51 void MD5Init (MD5_CTX *mdContext);\r
52 void MD5Update (MD5_CTX *mdContext, unsigned char *inBuf, unsigned int inLen);\r
53 void MD5Final (unsigned char hash[], MD5_CTX *mdContext);\r
54 \r
55 #endif /* MD5_H */\r