Staging
v0.5.1
Revision 9b24649118b99987a42fcab0a9793bd5d2b0d762 authored by cvs2svn on 15 August 1997, 20:18:44 UTC, committed by cvs2svn on 15 August 1997, 20:18:44 UTC
1 parent 1fed5b3
Raw File
cryptmodule.c
/* cryptmodule.c - by Steve Majewski
 */

#include "Python.h"

#include <sys/types.h>


/* Module crypt */


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

	if (!PyArg_Parse(args, "(ss)", &word, &salt)) {
		return NULL;
	}
	return PyString_FromString( crypt( word, salt ) );

}

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

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