Class around PixMap objects that allows more python-like access. By Joe Strout.
[python/dscho.git] / Modules / cryptmodule.c
blob7cc03bed28ffa4ab730c0b4399c90959dd590bc8
1 /* cryptmodule.c - by Steve Majewski
2 */
4 #include "Python.h"
6 #include <sys/types.h>
9 /* Module crypt */
12 static PyObject *crypt_crypt(self, args)
13 PyObject *self, *args;
15 char *word, *salt;
16 extern char * crypt();
18 if (!PyArg_Parse(args, "(ss)", &word, &salt)) {
19 return NULL;
21 return PyString_FromString( crypt( word, salt ) );
25 static PyMethodDef crypt_methods[] = {
26 {"crypt", crypt_crypt},
27 {NULL, NULL} /* sentinel */
30 DL_EXPORT(void)
31 initcrypt()
33 Py_InitModule("crypt", crypt_methods);