/* cc -o encrypt encrypt.c -lcrypt */ #define _XOPEN_SOURCE #include <unistd.h> #include <stdio.h> int main(void) { char *m="hello!L"; char *s=crypt(m,"ab"); printf("String: %s, encryption: %s\n", m, s); return 0; }