Staging
v0.5.1
https://github.com/python/cpython
Raw File
Tip revision: 16c8eccfcf85811d1d9368aacb94b47ae8195719 authored by cvs2svn on 31 December 1997, 05:53:15 UTC
This commit was manufactured by cvs2svn to create tag 'release15'.
Tip revision: 16c8ecc
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