Staging
v0.5.1
https://github.com/python/cpython
Raw File
Tip revision: e2aaa9dd61632e48da08372dfb7f3365ed6d663b authored by cvs2svn on 14 February 1995, 00:58:59 UTC
This commit was manufactured by cvs2svn to create tag 'r12beta3'.
Tip revision: e2aaa9d
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