git.asbjorn.biz
/
swftools.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
45eef1c
)
added comments, made non-external functions static.
author
kramm
<kramm>
Sun, 30 Nov 2003 10:36:58 +0000
(10:36 +0000)
committer
kramm
<kramm>
Sun, 30 Nov 2003 10:36:58 +0000
(10:36 +0000)
lib/MD5.c
patch
|
blob
|
history
lib/MD5.h
patch
|
blob
|
history
diff --git
a/lib/MD5.c
b/lib/MD5.c
index
7107b40
..
cfadea1
100644
(file)
--- a/
lib/MD5.c
+++ b/
lib/MD5.c
@@
-30,6
+30,8
@@
* SUCH DAMAGE.
*/
* SUCH DAMAGE.
*/
+#include <string.h>
+
#ifndef _NETINET6_MD5_H_
#define _NETINET6_MD5_H_
#ifndef _NETINET6_MD5_H_
#define _NETINET6_MD5_H_
@@
-65,10
+67,10
@@
typedef struct {
u_int8_t md5_buf[MD5_BUFLEN];
} md5_ctxt;
u_int8_t md5_buf[MD5_BUFLEN];
} md5_ctxt;
-extern void md5_init(md5_ctxt *);
-extern void md5_loop(md5_ctxt *, const u_int8_t *, u_int);
-extern void md5_pad(md5_ctxt *);
-extern void md5_result(u_int8_t *, md5_ctxt *);
+static void md5_init(md5_ctxt *);
+static void md5_loop(md5_ctxt *, const u_int8_t *, u_int);
+static void md5_pad(md5_ctxt *);
+static void md5_result(u_int8_t *, md5_ctxt *);
/* compatibility */
#define MD5_CTX md5_ctxt
/* compatibility */
#define MD5_CTX md5_ctxt
@@
-124,7
+126,7
@@
do { \
static char itoa64[] = /* 0 ... 63 => ascii - 64 */
"./0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
static char itoa64[] = /* 0 ... 63 => ascii - 64 */
"./0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
-void
+static void
_crypt_to64(char *s, u_long v, int n)
{
while (--n >= 0) {
_crypt_to64(char *s, u_long v, int n)
{
while (--n >= 0) {
@@
-366,7
+368,7
@@
static const u_int8_t md5_paddat[MD5_BUFLEN] = {
static void md5_calc(u_int8_t *, md5_ctxt *);
static void md5_calc(u_int8_t *, md5_ctxt *);
-void md5_init(ctxt)
+static void md5_init(ctxt)
md5_ctxt *ctxt;
{
ctxt->md5_n = 0;
md5_ctxt *ctxt;
{
ctxt->md5_n = 0;
@@
-378,7
+380,7
@@
void md5_init(ctxt)
bzero(ctxt->md5_buf, sizeof(ctxt->md5_buf));
}
bzero(ctxt->md5_buf, sizeof(ctxt->md5_buf));
}
-void md5_loop(ctxt, input, len)
+static void md5_loop(ctxt, input, len)
md5_ctxt *ctxt;
const u_int8_t *input;
u_int len; /* number of bytes */
md5_ctxt *ctxt;
const u_int8_t *input;
u_int len; /* number of bytes */
@@
-406,7
+408,7
@@
void md5_loop(ctxt, input, len)
}
}
}
}
-void md5_pad(ctxt)
+static void md5_pad(ctxt)
md5_ctxt *ctxt;
{
u_int gap;
md5_ctxt *ctxt;
{
u_int gap;
@@
-445,7
+447,7
@@
void md5_pad(ctxt)
md5_calc(ctxt->md5_buf, ctxt);
}
md5_calc(ctxt->md5_buf, ctxt);
}
-void md5_result(digest, ctxt)
+static void md5_result(digest, ctxt)
u_int8_t *digest;
md5_ctxt *ctxt;
{
u_int8_t *digest;
md5_ctxt *ctxt;
{
diff --git
a/lib/MD5.h
b/lib/MD5.h
index
9d05cbb
..
cfe2b75
100644
(file)
--- a/
lib/MD5.h
+++ b/
lib/MD5.h
@@
-23,5
+23,6
@@
#ifndef __MD5_h__
#define __MD5_h__
#ifndef __MD5_h__
#define __MD5_h__
+/* WARNING: crypt_md5 is not reentrant */
char * crypt_md5(const char *pw, const char *salt);
#endif
char * crypt_md5(const char *pw, const char *salt);
#endif