Staging
v0.5.1
https://github.com/python/cpython
Revision 94ed6f5f63b5fbeca72bfdbc54b0055bed3d3b8e authored by Guido van Rossum on 06 October 1994, 17:08:42 UTC, committed by Guido van Rossum on 06 October 1994, 17:08:42 UTC
1 parent 8780a44
Raw File
Tip revision: 94ed6f5f63b5fbeca72bfdbc54b0055bed3d3b8e authored by Guido van Rossum on 06 October 1994, 17:08:42 UTC
Oops! version numbers again!
Tip revision: 94ed6f5
cryptmodule.c
/* cryptmodule.c - by Steve Majewski
 */

#include "allobjects.h"
#include "modsupport.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