Staging
v0.5.1
https://github.com/python/cpython
Revision 557d6d6608bd2a0486f04814f7ab2f605169d613 authored by Guido van Rossum on 30 July 1996, 20:44:31 UTC, committed by Guido van Rossum on 30 July 1996, 20:44:31 UTC
(But hypot() should really be defined in a separate file, triggered by
configure.)
1 parent 64b6567
Raw File
Tip revision: 557d6d6608bd2a0486f04814f7ab2f605169d613 authored by Guido van Rossum on 30 July 1996, 20:44:31 UTC
Don't make an exception for NeXT (BBUM says it's no longer needed).
Tip revision: 557d6d6
cryptmodule.c
/* cryptmodule.c - by Steve Majewski
 */

#include "allobjects.h"

#include <sys/types.h>


/* Module crypt */


static object *crypt_crypt(self, args)
	object *self, *args;
{
	char *word, *salt; 
	extern char * crypt();

	struct passwd *p;
	if (!getargs(args, "(ss)", &word, &salt)) {
		return NULL;
	}
	return newstringobject( crypt( word, salt ) );

}

static struct methodlist crypt_methods[] = {
	{"crypt",	crypt_crypt},
	{NULL,		NULL}		/* sentinel */
};

void
initcrypt()
{
	initmodule("crypt", crypt_methods);
}
back to top