1 #define _XOPEN_SOURCE 2 #include <stdio.h> 3 #include <unistd.h> 4 5 int main(int argc, char *argv[]) 6 { 7 unsigned char *md = NULL; 8 9 md = crypt("password", "salt"); 10 printf("%s\n", md); 11 12 return 0; 13 }
1 #define _XOPEN_SOURCE 2 #include <stdio.h> 3 #include <unistd.h> 4 5 int main(int argc, char *argv[]) 6 { 7 unsigned char *md = NULL; 8 9 md = crypt("password", "salt"); 10 printf("%s\n", md); 11 12 return 0; 13 }
转载于:https://www.cnblogs.com/mtsyl/p/5341744.html