- new folder src/ to hold the source code for main project applications
- main.c is in src/
- all core files are subfolder are in src/core/
- modules are in src/modules/
- libs are in src/lib/
- application Makefiles are in src/
- application binary is built in src/ (src/kamailio)
1 | 1 |
deleted file mode 100644 |
... | ... |
@@ -1,57 +0,0 @@ |
1 |
-/* $OpenBSD: md5.h,v 1.15 2004/05/03 17:30:14 millert Exp $ */ |
|
2 |
- |
|
3 |
-/* |
|
4 |
- * This code implements the MD5 message-digest algorithm. |
|
5 |
- * The algorithm is due to Ron Rivest. This code was |
|
6 |
- * written by Colin Plumb in 1993, no copyright is claimed. |
|
7 |
- * This code is in the public domain; do with it what you wish. |
|
8 |
- * |
|
9 |
- * Equivalent code is available from RSA Data Security, Inc. |
|
10 |
- * This code has been tested against that, and is equivalent, |
|
11 |
- * except that you don't need to include two pages of legalese |
|
12 |
- * with every copy. |
|
13 |
- */ |
|
14 |
- |
|
15 |
-#ifndef _MD5_H_ |
|
16 |
-#define _MD5_H_ |
|
17 |
- |
|
18 |
-#ifndef __OS_solaris |
|
19 |
- |
|
20 |
-#define MD5_BLOCK_LENGTH 64 |
|
21 |
-#define MD5_DIGEST_LENGTH 16 |
|
22 |
-#define MD5_DIGEST_STRING_LENGTH (MD5_DIGEST_LENGTH * 2 + 1) |
|
23 |
- |
|
24 |
-/* Probably not the proper place, but will do for Debian: */ |
|
25 |
-#include <sys/types.h> |
|
26 |
- |
|
27 |
-typedef struct MD5Context { |
|
28 |
- u_int32_t state[4]; /* state */ |
|
29 |
- u_int64_t count; /* number of bits, mod 2^64 */ |
|
30 |
- unsigned char buffer[MD5_BLOCK_LENGTH]; /* input buffer */ |
|
31 |
-} MD5_CTX; |
|
32 |
- |
|
33 |
-void MD5Init(MD5_CTX *); |
|
34 |
-void U_MD5Update(MD5_CTX *, const unsigned char *, size_t); |
|
35 |
-void MD5Pad(MD5_CTX *); |
|
36 |
-void U_MD5Final(unsigned char [MD5_DIGEST_LENGTH], MD5_CTX *); |
|
37 |
-void MD5Transform(u_int32_t [4], const unsigned char [MD5_BLOCK_LENGTH]); |
|
38 |
- |
|
39 |
-static inline void MD5Update(MD5_CTX *ctx, const char *str, size_t len) { |
|
40 |
- U_MD5Update(ctx, (const unsigned char *)str, len); |
|
41 |
-} |
|
42 |
- |
|
43 |
-static inline void MD5Final(char buf[MD5_DIGEST_LENGTH], MD5_CTX *ctx) { |
|
44 |
- U_MD5Final((unsigned char *)buf, ctx); |
|
45 |
-} |
|
46 |
- |
|
47 |
-#else /* __OS_solaris */ |
|
48 |
-#include <md5.h> |
|
49 |
- |
|
50 |
-#define U_MD5Update(ctx, input, len) \ |
|
51 |
- MD5Update(ctx, input, len) |
|
52 |
-#define U_MD5Final(digest, ctx) \ |
|
53 |
- MD5Final(digest, ctx) |
|
54 |
- |
|
55 |
-#endif /* __OS_solaris */ |
|
56 |
- |
|
57 |
-#endif /* _MD5_H_ */ |
- Allows use of SPARC optimized functions
... | ... |
@@ -15,6 +15,8 @@ |
15 | 15 |
#ifndef _MD5_H_ |
16 | 16 |
#define _MD5_H_ |
17 | 17 |
|
18 |
+#ifndef __OS_solaris |
|
19 |
+ |
|
18 | 20 |
#define MD5_BLOCK_LENGTH 64 |
19 | 21 |
#define MD5_DIGEST_LENGTH 16 |
20 | 22 |
#define MD5_DIGEST_STRING_LENGTH (MD5_DIGEST_LENGTH * 2 + 1) |
... | ... |
@@ -22,13 +24,6 @@ |
22 | 24 |
/* Probably not the proper place, but will do for Debian: */ |
23 | 25 |
#include <sys/types.h> |
24 | 26 |
|
25 |
-/* fix types for Sun Solaris */ |
|
26 |
-#if defined(__SVR4) || defined(__sun) |
|
27 |
- typedef uint8_t u_int8_t; |
|
28 |
- typedef uint32_t u_int32_t; |
|
29 |
- typedef uint64_t u_int64_t; |
|
30 |
-#endif |
|
31 |
- |
|
32 | 27 |
typedef struct MD5Context { |
33 | 28 |
u_int32_t state[4]; /* state */ |
34 | 29 |
u_int64_t count; /* number of bits, mod 2^64 */ |
... | ... |
@@ -49,4 +44,14 @@ static inline void MD5Final(char buf[MD5_DIGEST_LENGTH], MD5_CTX *ctx) { |
49 | 44 |
U_MD5Final((unsigned char *)buf, ctx); |
50 | 45 |
} |
51 | 46 |
|
47 |
+#else /* __OS_solaris */ |
|
48 |
+#include <md5.h> |
|
49 |
+ |
|
50 |
+#define U_MD5Update(ctx, input, len) \ |
|
51 |
+ MD5Update(ctx, input, len) |
|
52 |
+#define U_MD5Final(digest, ctx) \ |
|
53 |
+ MD5Final(digest, ctx) |
|
54 |
+ |
|
55 |
+#endif /* __OS_solaris */ |
|
56 |
+ |
|
52 | 57 |
#endif /* _MD5_H_ */ |
... | ... |
@@ -22,6 +22,13 @@ |
22 | 22 |
/* Probably not the proper place, but will do for Debian: */ |
23 | 23 |
#include <sys/types.h> |
24 | 24 |
|
25 |
+/* fix types for Sun Solaris */ |
|
26 |
+#if defined(__SVR4) || defined(__sun) |
|
27 |
+ typedef uint8_t u_int8_t; |
|
28 |
+ typedef uint32_t u_int32_t; |
|
29 |
+ typedef uint64_t u_int64_t; |
|
30 |
+#endif |
|
31 |
+ |
|
25 | 32 |
typedef struct MD5Context { |
26 | 33 |
u_int32_t state[4]; /* state */ |
27 | 34 |
u_int64_t count; /* number of bits, mod 2^64 */ |
Author: Tzafrir Cohen <tzafrir@debian.org>
... | ... |
@@ -19,16 +19,27 @@ |
19 | 19 |
#define MD5_DIGEST_LENGTH 16 |
20 | 20 |
#define MD5_DIGEST_STRING_LENGTH (MD5_DIGEST_LENGTH * 2 + 1) |
21 | 21 |
|
22 |
+/* Probably not the proper place, but will do for Debian: */ |
|
23 |
+#include <sys/types.h> |
|
24 |
+ |
|
22 | 25 |
typedef struct MD5Context { |
23 | 26 |
u_int32_t state[4]; /* state */ |
24 | 27 |
u_int64_t count; /* number of bits, mod 2^64 */ |
25 |
- u_int8_t buffer[MD5_BLOCK_LENGTH]; /* input buffer */ |
|
28 |
+ unsigned char buffer[MD5_BLOCK_LENGTH]; /* input buffer */ |
|
26 | 29 |
} MD5_CTX; |
27 | 30 |
|
28 | 31 |
void MD5Init(MD5_CTX *); |
29 |
-void MD5Update(MD5_CTX *, const u_int8_t *, size_t); |
|
32 |
+void U_MD5Update(MD5_CTX *, const unsigned char *, size_t); |
|
30 | 33 |
void MD5Pad(MD5_CTX *); |
31 |
-void MD5Final(u_int8_t [MD5_DIGEST_LENGTH], MD5_CTX *); |
|
32 |
-void MD5Transform(u_int32_t [4], const u_int8_t [MD5_BLOCK_LENGTH]); |
|
34 |
+void U_MD5Final(unsigned char [MD5_DIGEST_LENGTH], MD5_CTX *); |
|
35 |
+void MD5Transform(u_int32_t [4], const unsigned char [MD5_BLOCK_LENGTH]); |
|
36 |
+ |
|
37 |
+static inline void MD5Update(MD5_CTX *ctx, const char *str, size_t len) { |
|
38 |
+ U_MD5Update(ctx, (const unsigned char *)str, len); |
|
39 |
+} |
|
40 |
+ |
|
41 |
+static inline void MD5Final(char buf[MD5_DIGEST_LENGTH], MD5_CTX *ctx) { |
|
42 |
+ U_MD5Final((unsigned char *)buf, ctx); |
|
43 |
+} |
|
33 | 44 |
|
34 | 45 |
#endif /* _MD5_H_ */ |
Origin: http://anonscm.debian.org/gitweb/?p=dpkg/dpkg.git;a=summary
Author: Tzafrir Cohen <tzafrir@debian.org>
Borrowed the md5 code from dpkg instead of the existing md5.[ch]
This makes the code compatible with Debian packing rules and
restrictions regarding license for distribution
... | ... |
@@ -1,102 +1,34 @@ |
1 |
+/* $OpenBSD: md5.h,v 1.15 2004/05/03 17:30:14 millert Exp $ */ |
|
2 |
+ |
|
1 | 3 |
/* |
2 |
- * Copyright (C) 1991-2, RSA Data Security, Inc. Created 1991. All |
|
3 |
- * rights reserved. |
|
4 |
- * |
|
5 |
- * License to copy and use this software is granted provided that it |
|
6 |
- * is identified as the "RSA Data Security, Inc. MD5 Message-Digest |
|
7 |
- * Algorithm" in all material mentioning or referencing this software |
|
8 |
- * or this function. |
|
9 |
- * |
|
10 |
- * License is also granted to make and use derivative works provided |
|
11 |
- * that such works are identified as "derived from the RSA Data |
|
12 |
- * Security, Inc. MD5 Message-Digest Algorithm" in all material |
|
13 |
- * mentioning or referencing the derived work. |
|
14 |
- * |
|
15 |
- * RSA Data Security, Inc. makes no representations concerning either |
|
16 |
- * the merchantability of this software or the suitability of this |
|
17 |
- * software for any particular purpose. It is provided "as is" |
|
18 |
- * without express or implied warranty of any kind. |
|
19 |
- * |
|
20 |
- * These notices must be retained in any copies of any part of this |
|
21 |
- * documentation and/or software. |
|
4 |
+ * This code implements the MD5 message-digest algorithm. |
|
5 |
+ * The algorithm is due to Ron Rivest. This code was |
|
6 |
+ * written by Colin Plumb in 1993, no copyright is claimed. |
|
7 |
+ * This code is in the public domain; do with it what you wish. |
|
8 |
+ * |
|
9 |
+ * Equivalent code is available from RSA Data Security, Inc. |
|
10 |
+ * This code has been tested against that, and is equivalent, |
|
11 |
+ * except that you don't need to include two pages of legalese |
|
12 |
+ * with every copy. |
|
22 | 13 |
*/ |
23 | 14 |
|
24 |
-/*! |
|
25 |
- * \file |
|
26 |
- * \brief SIP-router core :: md5 hash support |
|
27 |
- * \ingroup core |
|
28 |
- * Module: \ref core |
|
29 |
- */ |
|
15 |
+#ifndef _MD5_H_ |
|
16 |
+#define _MD5_H_ |
|
30 | 17 |
|
31 |
-#ifndef MD5_H |
|
32 |
-#define MD5_H |
|
18 |
+#define MD5_BLOCK_LENGTH 64 |
|
19 |
+#define MD5_DIGEST_LENGTH 16 |
|
20 |
+#define MD5_DIGEST_STRING_LENGTH (MD5_DIGEST_LENGTH * 2 + 1) |
|
33 | 21 |
|
34 |
-/** |
|
35 |
- * \brief MD5 context |
|
36 |
- */ |
|
37 |
-typedef struct { |
|
38 |
- unsigned int state[4]; /* state (ABCD) */ |
|
39 |
- unsigned int count[2]; /* number of bits, modulo 2^64 (lsb first) */ |
|
40 |
- unsigned char buffer[64]; /* input buffer */ |
|
22 |
+typedef struct MD5Context { |
|
23 |
+ u_int32_t state[4]; /* state */ |
|
24 |
+ u_int64_t count; /* number of bits, mod 2^64 */ |
|
25 |
+ u_int8_t buffer[MD5_BLOCK_LENGTH]; /* input buffer */ |
|
41 | 26 |
} MD5_CTX; |
42 | 27 |
|
43 |
-/** |
|
44 |
- * \brief MD5 context initialization |
|
45 |
- * |
|
46 |
- * MD5 context initialization. Begins an MD5 operation, writing a new context. |
|
47 |
- * \param context initialized context |
|
48 |
- */ |
|
49 |
-void MD5Init (MD5_CTX *context); |
|
50 |
- |
|
51 |
-/** |
|
52 |
- * \brief MD5 block update operation |
|
53 |
- * |
|
54 |
- * MD5 block update operation. Continues an MD5 message-digest |
|
55 |
- * operation, processing another message block, and updating the |
|
56 |
- * context. |
|
57 |
- * \param context context |
|
58 |
- * \param input input block |
|
59 |
- * \param inputLen length of input block |
|
60 |
- */ |
|
61 |
-void U_MD5Update (MD5_CTX *context, unsigned char *input, unsigned int inputLen); |
|
62 |
- |
|
63 |
- /** |
|
64 |
- * \brief MD5 finalization |
|
65 |
- * |
|
66 |
- * MD5 finalization. Ends an MD5 message-digest operation, writing the |
|
67 |
- * the message digest and zeroizing the context. |
|
68 |
- * \param digest message digest |
|
69 |
- * \param context context |
|
70 |
- */ |
|
71 |
-void U_MD5Final (unsigned char digest[16], MD5_CTX *context); |
|
72 |
- |
|
73 |
-/*! |
|
74 |
- * \brief Small wrapper around MD5Update |
|
75 |
- * |
|
76 |
- * Small wrapper around MD5Update, because everybody uses this on 'str' types |
|
77 |
- * \param context MD5 context |
|
78 |
- * \param input input block |
|
79 |
- * \param inputLen length of input block |
|
80 |
- * \note please not use this in new code |
|
81 |
- * \todo review and fix all wrong usage |
|
82 |
- */ |
|
83 |
-static inline void MD5Update (MD5_CTX *context, char *input, unsigned int inputLen) |
|
84 |
-{ |
|
85 |
- return U_MD5Update(context, (unsigned char *)input, inputLen); |
|
86 |
-} |
|
87 |
- |
|
88 |
-/*! |
|
89 |
- * \brief Small wrapper around MD5Final |
|
90 |
- * |
|
91 |
- * Small wrapper around MD5Final, because everybody uses this on 'str' types |
|
92 |
- * \param digest message digest |
|
93 |
- * \param context MD5 context |
|
94 |
- * \note please not use this in new code |
|
95 |
- * \todo review and fix all wrong usage |
|
96 |
- */ |
|
97 |
-static inline void MD5Final (char digest[16], MD5_CTX *context) |
|
98 |
-{ |
|
99 |
- U_MD5Final((unsigned char *)digest, context); |
|
100 |
-} |
|
28 |
+void MD5Init(MD5_CTX *); |
|
29 |
+void MD5Update(MD5_CTX *, const u_int8_t *, size_t); |
|
30 |
+void MD5Pad(MD5_CTX *); |
|
31 |
+void MD5Final(u_int8_t [MD5_DIGEST_LENGTH], MD5_CTX *); |
|
32 |
+void MD5Transform(u_int32_t [4], const u_int8_t [MD5_BLOCK_LENGTH]); |
|
101 | 33 |
|
102 |
-#endif /* MD5_H */ |
|
34 |
+#endif /* _MD5_H_ */ |
* fix another bunch of gcc 4.5 'no real prototype' warnings by making the MD5
functions typesafe (removing this PROTO_LIST stuff)
* refactoring of function definitions to use a proper style, like everybody else
* remove not needed defines for datatypes, delete the then empty header completely
* remove the unneeded include of md5global.h from a few modules
* fix callers of MD5 utility functions which already use a proper type
* adapt format of RSA copyright notices to the common style as well
* add doxygen documentations to all functions and defines
* similar changes have been done in kamailio, but have been not ported to this
repository yet
... | ... |
@@ -31,14 +31,12 @@ |
31 | 31 |
#ifndef MD5_H |
32 | 32 |
#define MD5_H |
33 | 33 |
|
34 |
-#include "md5global.h" |
|
35 |
- |
|
36 | 34 |
/** |
37 | 35 |
* \brief MD5 context |
38 | 36 |
*/ |
39 | 37 |
typedef struct { |
40 |
- UINT4 state[4]; /* state (ABCD) */ |
|
41 |
- UINT4 count[2]; /* number of bits, modulo 2^64 (lsb first) */ |
|
38 |
+ unsigned int state[4]; /* state (ABCD) */ |
|
39 |
+ unsigned int count[2]; /* number of bits, modulo 2^64 (lsb first) */ |
|
42 | 40 |
unsigned char buffer[64]; /* input buffer */ |
43 | 41 |
} MD5_CTX; |
44 | 42 |
|
... | ... |
@@ -48,7 +46,7 @@ typedef struct { |
48 | 46 |
* MD5 context initialization. Begins an MD5 operation, writing a new context. |
49 | 47 |
* \param context initialized context |
50 | 48 |
*/ |
51 |
-void MD5Init PROTO_LIST ((MD5_CTX *)); |
|
49 |
+void MD5Init (MD5_CTX *context); |
|
52 | 50 |
|
53 | 51 |
/** |
54 | 52 |
* \brief MD5 block update operation |
... | ... |
@@ -60,8 +58,7 @@ void MD5Init PROTO_LIST ((MD5_CTX *)); |
60 | 58 |
* \param input input block |
61 | 59 |
* \param inputLen length of input block |
62 | 60 |
*/ |
63 |
-void MD5Update PROTO_LIST |
|
64 |
- ((MD5_CTX *, unsigned char *, unsigned int)); |
|
61 |
+void U_MD5Update (MD5_CTX *context, unsigned char *input, unsigned int inputLen); |
|
65 | 62 |
|
66 | 63 |
/** |
67 | 64 |
* \brief MD5 finalization |
... | ... |
@@ -71,6 +68,35 @@ void MD5Update PROTO_LIST |
71 | 68 |
* \param digest message digest |
72 | 69 |
* \param context context |
73 | 70 |
*/ |
74 |
-void MD5Final PROTO_LIST ((unsigned char [16], MD5_CTX *)); |
|
71 |
+void U_MD5Final (unsigned char digest[16], MD5_CTX *context); |
|
72 |
+ |
|
73 |
+/*! |
|
74 |
+ * \brief Small wrapper around MD5Update |
|
75 |
+ * |
|
76 |
+ * Small wrapper around MD5Update, because everybody uses this on 'str' types |
|
77 |
+ * \param context MD5 context |
|
78 |
+ * \param input input block |
|
79 |
+ * \param inputLen length of input block |
|
80 |
+ * \note please not use this in new code |
|
81 |
+ * \todo review and fix all wrong usage |
|
82 |
+ */ |
|
83 |
+static inline void MD5Update (MD5_CTX *context, char *input, unsigned int inputLen) |
|
84 |
+{ |
|
85 |
+ return U_MD5Update(context, (unsigned char *)input, inputLen); |
|
86 |
+} |
|
87 |
+ |
|
88 |
+/*! |
|
89 |
+ * \brief Small wrapper around MD5Final |
|
90 |
+ * |
|
91 |
+ * Small wrapper around MD5Final, because everybody uses this on 'str' types |
|
92 |
+ * \param digest message digest |
|
93 |
+ * \param context MD5 context |
|
94 |
+ * \note please not use this in new code |
|
95 |
+ * \todo review and fix all wrong usage |
|
96 |
+ */ |
|
97 |
+static inline void MD5Final (char digest[16], MD5_CTX *context) |
|
98 |
+{ |
|
99 |
+ U_MD5Final((unsigned char *)digest, context); |
|
100 |
+} |
|
75 | 101 |
|
76 | 102 |
#endif /* MD5_H */ |
... | ... |
@@ -1,28 +1,24 @@ |
1 |
-/* MD5.H - header file for MD5C.C |
|
2 |
- * $Id$ |
|
3 |
- */ |
|
4 |
- |
|
5 |
- |
|
6 |
-/* Copyright (C) 1991-2, RSA Data Security, Inc. Created 1991. All |
|
7 |
-rights reserved. |
|
8 |
- |
|
9 |
-License to copy and use this software is granted provided that it |
|
10 |
-is identified as the "RSA Data Security, Inc. MD5 Message-Digest |
|
11 |
-Algorithm" in all material mentioning or referencing this software |
|
12 |
-or this function. |
|
13 |
- |
|
14 |
-License is also granted to make and use derivative works provided |
|
15 |
-that such works are identified as "derived from the RSA Data |
|
16 |
-Security, Inc. MD5 Message-Digest Algorithm" in all material |
|
17 |
-mentioning or referencing the derived work. |
|
18 |
- |
|
19 |
-RSA Data Security, Inc. makes no representations concerning either |
|
20 |
-the merchantability of this software or the suitability of this |
|
21 |
-software for any particular purpose. It is provided "as is" |
|
22 |
-without express or implied warranty of any kind. |
|
23 |
- |
|
24 |
-These notices must be retained in any copies of any part of this |
|
25 |
-documentation and/or software. |
|
1 |
+/* |
|
2 |
+ * Copyright (C) 1991-2, RSA Data Security, Inc. Created 1991. All |
|
3 |
+ * rights reserved. |
|
4 |
+ * |
|
5 |
+ * License to copy and use this software is granted provided that it |
|
6 |
+ * is identified as the "RSA Data Security, Inc. MD5 Message-Digest |
|
7 |
+ * Algorithm" in all material mentioning or referencing this software |
|
8 |
+ * or this function. |
|
9 |
+ * |
|
10 |
+ * License is also granted to make and use derivative works provided |
|
11 |
+ * that such works are identified as "derived from the RSA Data |
|
12 |
+ * Security, Inc. MD5 Message-Digest Algorithm" in all material |
|
13 |
+ * mentioning or referencing the derived work. |
|
14 |
+ * |
|
15 |
+ * RSA Data Security, Inc. makes no representations concerning either |
|
16 |
+ * the merchantability of this software or the suitability of this |
|
17 |
+ * software for any particular purpose. It is provided "as is" |
|
18 |
+ * without express or implied warranty of any kind. |
|
19 |
+ * |
|
20 |
+ * These notices must be retained in any copies of any part of this |
|
21 |
+ * documentation and/or software. |
|
26 | 22 |
*/ |
27 | 23 |
|
28 | 24 |
#ifndef MD5_H |
... | ... |
@@ -30,16 +26,44 @@ documentation and/or software. |
30 | 26 |
|
31 | 27 |
#include "md5global.h" |
32 | 28 |
|
33 |
-/* MD5 context. */ |
|
29 |
+/** |
|
30 |
+ * \brief MD5 context |
|
31 |
+ */ |
|
34 | 32 |
typedef struct { |
35 | 33 |
UINT4 state[4]; /* state (ABCD) */ |
36 | 34 |
UINT4 count[2]; /* number of bits, modulo 2^64 (lsb first) */ |
37 | 35 |
unsigned char buffer[64]; /* input buffer */ |
38 | 36 |
} MD5_CTX; |
39 | 37 |
|
38 |
+/** |
|
39 |
+ * \brief MD5 context initialization |
|
40 |
+ * |
|
41 |
+ * MD5 context initialization. Begins an MD5 operation, writing a new context. |
|
42 |
+ * \param context initialized context |
|
43 |
+ */ |
|
40 | 44 |
void MD5Init PROTO_LIST ((MD5_CTX *)); |
45 |
+ |
|
46 |
+/** |
|
47 |
+ * \brief MD5 block update operation |
|
48 |
+ * |
|
49 |
+ * MD5 block update operation. Continues an MD5 message-digest |
|
50 |
+ * operation, processing another message block, and updating the |
|
51 |
+ * context. |
|
52 |
+ * \param context context |
|
53 |
+ * \param input input block |
|
54 |
+ * \param inputLen length of input block |
|
55 |
+ */ |
|
41 | 56 |
void MD5Update PROTO_LIST |
42 | 57 |
((MD5_CTX *, unsigned char *, unsigned int)); |
58 |
+ |
|
59 |
+ /** |
|
60 |
+ * \brief MD5 finalization |
|
61 |
+ * |
|
62 |
+ * MD5 finalization. Ends an MD5 message-digest operation, writing the |
|
63 |
+ * the message digest and zeroizing the context. |
|
64 |
+ * \param digest message digest |
|
65 |
+ * \param context context |
|
66 |
+ */ |
|
43 | 67 |
void MD5Final PROTO_LIST ((unsigned char [16], MD5_CTX *)); |
44 | 68 |
|
45 | 69 |
#endif /* MD5_H */ |
... | ... |
@@ -25,6 +25,11 @@ These notices must be retained in any copies of any part of this |
25 | 25 |
documentation and/or software. |
26 | 26 |
*/ |
27 | 27 |
|
28 |
+#ifndef MD5_H |
|
29 |
+#define MD5_H |
|
30 |
+ |
|
31 |
+#include "md5global.h" |
|
32 |
+ |
|
28 | 33 |
/* MD5 context. */ |
29 | 34 |
typedef struct { |
30 | 35 |
UINT4 state[4]; /* state (ABCD) */ |
... | ... |
@@ -37,3 +42,4 @@ void MD5Update PROTO_LIST |
37 | 42 |
((MD5_CTX *, unsigned char *, unsigned int)); |
38 | 43 |
void MD5Final PROTO_LIST ((unsigned char [16], MD5_CTX *)); |
39 | 44 |
|
45 |
+#endif /* MD5_H */ |
1 | 1 |
new file mode 100644 |
... | ... |
@@ -0,0 +1,37 @@ |
1 |
+/* MD5.H - header file for MD5C.C |
|
2 |
+ */ |
|
3 |
+ |
|
4 |
+/* Copyright (C) 1991-2, RSA Data Security, Inc. Created 1991. All |
|
5 |
+rights reserved. |
|
6 |
+ |
|
7 |
+License to copy and use this software is granted provided that it |
|
8 |
+is identified as the "RSA Data Security, Inc. MD5 Message-Digest |
|
9 |
+Algorithm" in all material mentioning or referencing this software |
|
10 |
+or this function. |
|
11 |
+ |
|
12 |
+License is also granted to make and use derivative works provided |
|
13 |
+that such works are identified as "derived from the RSA Data |
|
14 |
+Security, Inc. MD5 Message-Digest Algorithm" in all material |
|
15 |
+mentioning or referencing the derived work. |
|
16 |
+ |
|
17 |
+RSA Data Security, Inc. makes no representations concerning either |
|
18 |
+the merchantability of this software or the suitability of this |
|
19 |
+software for any particular purpose. It is provided "as is" |
|
20 |
+without express or implied warranty of any kind. |
|
21 |
+ |
|
22 |
+These notices must be retained in any copies of any part of this |
|
23 |
+documentation and/or software. |
|
24 |
+ */ |
|
25 |
+ |
|
26 |
+/* MD5 context. */ |
|
27 |
+typedef struct { |
|
28 |
+ UINT4 state[4]; /* state (ABCD) */ |
|
29 |
+ UINT4 count[2]; /* number of bits, modulo 2^64 (lsb first) */ |
|
30 |
+ unsigned char buffer[64]; /* input buffer */ |
|
31 |
+} MD5_CTX; |
|
32 |
+ |
|
33 |
+void MD5Init PROTO_LIST ((MD5_CTX *)); |
|
34 |
+void MD5Update PROTO_LIST |
|
35 |
+ ((MD5_CTX *, unsigned char *, unsigned int)); |
|
36 |
+void MD5Final PROTO_LIST ((unsigned char [16], MD5_CTX *)); |
|
37 |
+ |