Staging
v0.5.1
https://github.com/python/cpython
Revision 9a61dc90e21b2cdf9e0d805991fa69e1eefa3953 authored by Guido van Rossum on 08 October 1997, 15:25:08 UTC, committed by Guido van Rossum on 08 October 1997, 15:25:08 UTC
1 parent ac1fc95
Raw File
Tip revision: 9a61dc90e21b2cdf9e0d805991fa69e1eefa3953 authored by Guido van Rossum on 08 October 1997, 15:25:08 UTC
Moved mac-specific speedup to a different place (Jack)
Tip revision: 9a61dc9
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