Browse Source

for magic MD5 salt, call md5crypt()

OPENBSD_2_0
deraadt 28 years ago
parent
commit
151d8112cc
1 changed files with 6 additions and 3 deletions
  1. +6
    -3
      src/lib/libc/crypt/crypt.c

+ 6
- 3
src/lib/libc/crypt/crypt.c View File

@ -1,4 +1,4 @@
/* $OpenBSD: crypt.c,v 1.4 1996/06/03 22:20:35 niklas Exp $ */
/* $OpenBSD: crypt.c,v 1.5 1996/07/02 23:05:55 deraadt Exp $ */
/* /*
* FreeSec: libcrypt * FreeSec: libcrypt
@ -596,14 +596,17 @@ crypt(key, setting)
const char *setting; const char *setting;
{ {
int i; int i;
u_int32_t count, salt, l, r0, r1, keybuf[2];
u_int32_t count, salt, l, r0, r1, keybuf[2];
u_char *p, *q; u_char *p, *q;
static u_char output[21]; static u_char output[21];
extern char *md5crypt __P((const char *, const char *));
if (strncmp(setting, "$1$", sizeof("$1")) == 0)
return (md5crypt(key, setting));
if (!des_initialised) if (!des_initialised)
des_init(); des_init();
/* /*
* Copy the key, shifting each character up by one bit * Copy the key, shifting each character up by one bit
* and padding with zeros. * and padding with zeros.


Loading…
Cancel
Save