summaryrefslogtreecommitdiff
path: root/src/lib/libc/crypt/md5crypt.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libc/crypt/md5crypt.c')
-rw-r--r--src/lib/libc/crypt/md5crypt.c15
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)
16static char rcsid[] = "$OpenBSD: md5crypt.c,v 1.12 2003/06/25 21:16:47 deraadt Exp $"; 16static 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 */
28static void to64(char *, u_int32_t, int); 28static void to64(char *, u_int32_t, int);
29 29
30static void 30static void
31to64(s, v, n) 31to64(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)
48char *md5crypt(const char *pw, const char *salt); 45char *md5crypt(const char *pw, const char *salt);
49 46
50char * 47char *
51md5crypt(pw, salt) 48md5crypt(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}