/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (the "License").
* You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright 2009 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
/*
* Portions of this code:
* ----------------------------------------------------------------------------
* "THE BEER-WARE LICENSE" (Revision 42):
* <phk@login.dknet.dk> wrote this file. As long as you retain this notice you
* can do whatever you want with this stuff. If we meet some day, and you think
* this stuff is worth it, you can buy me a beer in return. Poul-Henning Kamp
* ----------------------------------------------------------------------------
*
* $FreeBSD: crypt.c,v 1.5 1996/10/14 08:34:02 phk Exp $
*
*/
#include <fcntl.h>
#include <unistd.h>
#include <string.h>
#include <strings.h>
#include <stdio.h>
#include <errno.h>
#include <md5.h>
#include <crypt.h>
"./0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
static void
{
while (--n >= 0) {
*s++ = itoa64[v & 0x3f];
v >>= 6;
}
}
/* ARGSUSED4 */
char *
const char *plaintext,
const char *switchsalt,
const char **params)
{
char *p;
/* Refine the salt */
/* skip our magic string */
}
/* Salt stops at the first $, max SALT_LEN chars */
continue;
/* The password first, since that is what is most unknown */
/* Then our magic string */
/* Then the raw salt */
/* Then just as many characters of the MD5(plaintext,salt,plaintext) */
/* Don't leave anything around in vm they could use. */
/* Then something really weird... */
if (i & 1) {
} else {
}
}
/* Now make the output string */
/*
* and now, just to make sure things don't run too fast
* On a 60 Mhz Pentium this takes 34 msec, so you would
* need 30 seconds to build a 1000 entry dictionary...
*/
for (i = 0; i < 1000; i++) {
if (i & 1)
else
if (i % 3)
if (i % 7)
if (i & 1)
else
}
*p = '\0';
/* Don't leave anything around in vm they could use. */
return (ctbuffer);
}
/* ARGSUSED2 */
char *
const char *oldsalt,
const char **params)
{
int fd;
int err;
return (NULL);
}
return (NULL);
}
return (gsbuffer);
}