Staging
v0.8.1
v0.8.1
Revision 7f49b7a1a46df219fdbb070375fc7066edd8c016 authored by Guido van Rossum on 12 January 1995, 12:38:46 UTC, committed by Guido van Rossum on 12 January 1995, 12:38:46 UTC
1 parent 2837970
cryptmodule.c
/* 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);
}
Computing file changes ...