diff options
author | deraadt <> | 2003-08-07 00:30:21 +0000 |
---|---|---|
committer | deraadt <> | 2003-08-07 00:30:21 +0000 |
commit | 9f9cc8ed4f154b827f6b717b6d3cd5fbbb89ccf9 (patch) | |
tree | 5d787255fad632b9194de414f06b2abdc64ee320 /src/lib/libc/crypt/md5crypt.c | |
parent | a020ac4fb1142d0bfea481464fcb724c23cf8e87 (diff) | |
download | openbsd-9f9cc8ed4f154b827f6b717b6d3cd5fbbb89ccf9.tar.gz openbsd-9f9cc8ed4f154b827f6b717b6d3cd5fbbb89ccf9.tar.bz2 openbsd-9f9cc8ed4f154b827f6b717b6d3cd5fbbb89ccf9.zip |
ansi
Diffstat (limited to 'src/lib/libc/crypt/md5crypt.c')
-rw-r--r-- | src/lib/libc/crypt/md5crypt.c | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/src/lib/libc/crypt/md5crypt.c b/src/lib/libc/crypt/md5crypt.c index fb09b375e6..97717e68d5 100644 --- a/src/lib/libc/crypt/md5crypt.c +++ b/src/lib/libc/crypt/md5crypt.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: md5crypt.c,v 1.12 2003/06/25 21:16:47 deraadt Exp $ */ | 1 | /* $OpenBSD: md5crypt.c,v 1.13 2003/08/07 00:30:21 deraadt Exp $ */ |
2 | 2 | ||
3 | /* | 3 | /* |
4 | * ---------------------------------------------------------------------------- | 4 | * ---------------------------------------------------------------------------- |
@@ -13,7 +13,7 @@ | |||
13 | */ | 13 | */ |
14 | 14 | ||
15 | #if defined(LIBC_SCCS) && !defined(lint) | 15 | #if defined(LIBC_SCCS) && !defined(lint) |
16 | static char rcsid[] = "$OpenBSD: md5crypt.c,v 1.12 2003/06/25 21:16:47 deraadt Exp $"; | 16 | static char rcsid[] = "$OpenBSD: md5crypt.c,v 1.13 2003/08/07 00:30:21 deraadt Exp $"; |
17 | #endif /* LIBC_SCCS and not lint */ | 17 | #endif /* LIBC_SCCS and not lint */ |
18 | 18 | ||
19 | #include <unistd.h> | 19 | #include <unistd.h> |
@@ -28,10 +28,7 @@ static unsigned char itoa64[] = /* 0 ... 63 => ascii - 64 */ | |||
28 | static void to64(char *, u_int32_t, int); | 28 | static void to64(char *, u_int32_t, int); |
29 | 29 | ||
30 | static void | 30 | static void |
31 | to64(s, v, n) | 31 | to64(char *s, u_int32_t v, int n) |
32 | char *s; | ||
33 | u_int32_t v; | ||
34 | int n; | ||
35 | { | 32 | { |
36 | while (--n >= 0) { | 33 | while (--n >= 0) { |
37 | *s++ = itoa64[v&0x3f]; | 34 | *s++ = itoa64[v&0x3f]; |
@@ -48,9 +45,7 @@ to64(s, v, n) | |||
48 | char *md5crypt(const char *pw, const char *salt); | 45 | char *md5crypt(const char *pw, const char *salt); |
49 | 46 | ||
50 | char * | 47 | char * |
51 | md5crypt(pw, salt) | 48 | md5crypt(const char *pw, const char *salt) |
52 | register const char *pw; | ||
53 | register const char *salt; | ||
54 | { | 49 | { |
55 | /* | 50 | /* |
56 | * This string is magic for this algorithm. Having | 51 | * This string is magic for this algorithm. Having |
@@ -151,7 +146,7 @@ md5crypt(pw, salt) | |||
151 | *p = '\0'; | 146 | *p = '\0'; |
152 | 147 | ||
153 | /* Don't leave anything around in vm they could use. */ | 148 | /* Don't leave anything around in vm they could use. */ |
154 | memset(final,0,sizeof final); | 149 | memset(final, 0, sizeof final); |
155 | 150 | ||
156 | return passwd; | 151 | return passwd; |
157 | } | 152 | } |