linux c 验证登录密码

 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 }

 

posted on 2016-03-31 16:49  埋头数月亮  阅读(320)  评论(0编辑  收藏  举报

导航