Mercurial > cpython-lru_cache-weakref
view Modules/cryptmodule.c @ 3930:52c19ee83a6b legacy-trunk
Guido's 1.4b2 fixes: Py_GetProgramName, Py_GetPrefix and Py_GetExecPrefix.
| author | Jack Jansen <jack.jansen@cwi.nl> |
|---|---|
| date | Fri, 02 Aug 1996 15:16:16 +0000 |
| parents | af36bae343fc |
| children | d36250aefb82 |
line wrap: on
line source
/* 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); }
